diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-09-24 01:00:11 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-09-24 01:00:11 +0800 |
| commit | ad37ddd823eb7edf3c7908f93fd40167d0562c1c (patch) | |
| tree | 1edf41ec530815df4eade560111da3c0f2de3fbb | |
| parent | 96afe4bad92fe7820c8716763dc942ac53939c18 (diff) | |
| download | mruby-ad37ddd823eb7edf3c7908f93fd40167d0562c1c.tar.gz mruby-ad37ddd823eb7edf3c7908f93fd40167d0562c1c.zip | |
Improve documentation for Gem and add limitations
| -rw-r--r-- | doc/mrbgems/README.md | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/mrbgems/README.md b/doc/mrbgems/README.md index f46c392ce..d17547b3d 100644 --- a/doc/mrbgems/README.md +++ b/doc/mrbgems/README.md @@ -25,7 +25,7 @@ The folder *mrblib* contains pure Ruby files to extend mruby. The folder *src* contains C files to extend mruby. The folder *test* contains pure Ruby files for testing purposes which will be used by mrbtest. The *Makefile* contains rules to build all C files and integrates them into the normal mruby -build process. +README.md+ is a short description for the Gem. +build process. *README.md* is a short description of your Gem. ## C Extension @@ -36,12 +36,12 @@ files to libmruby.a ### Pre-Conditions -mrbgems will automatically call the +gem-all+ make target of your Gem. Make -sure that you build all files in this target and that you add you object +mrbgems will automatically call the *gem-all* make target of your Gem. Make +sure that you build all files in this target and that you add your object files to libmruby.a mrbgems expects that you have implemented a C method called -*mrb_YOURGEMNAME_gem_init(mrb_state* mrb)*. YOURGEMNAME will be replaced +*mrb_YOURGEMNAME_gem_init(mrb_state)*. YOURGEMNAME will be replaced by the name of you Gem. The directory name of your Gem is considered also as the name! If you call your Gem directory *c_extension_example*, your initialisation method could look like this: @@ -104,3 +104,16 @@ process of your Ruby extension you can use the *Makefile* too. | +- README.md ``` + +## Current Limitations + +The following limitations are currently existing: + +* Gem _MUST NOT_ have a *src* folder in case it doesn't have a + C extension +* Gem _MUST NOT_ have a *mrblib* folder in case it doesn't have a + Ruby extension +* Only Ruby files in the root directory of *mrblib* will be integrated + +If you have ideas how to fix these issues without implementing to much +complexity into the code please provide your code or idea. |
