Commit e9f87368 authored by Daniel Bovensiepen's avatar Daniel Bovensiepen

Add usage documentation for mrbgems

parent b6a10248
......@@ -3,6 +3,20 @@
mrbgems is a library manager to integrate C and Ruby extension in an easy and
standardised way into mruby.
## Usage
By default mrbgems is currently deactivated. As long as mrbgems is deactivated
there is no overhead inside of the mruby interpreter.
To activate you have to make the following changes:
* set *ENABLE_GEMS* to *true* in *$(MRUBY_ROOT)/Makefile*
* define *ENABLE_GEMS* in *$(MRUBY_ROOT)/include/mrbconf.h*
* activate GEMs in *$(MRUBY_ROOT)/mrbgems/GEMS.active*
Every activated GEM has to be listed with his absolute path in *GEMS.active*. It
is possible to point to an alternative activate file:
* set *ACTIVE_GEMS* to your customized GEM list in *$(MRUBY_ROOT)/Makefile*
## GEM Structure
The maximal GEM structure looks like this:
......@@ -28,8 +42,6 @@ rules to build a *gem.a* file inside of the GEM directory. Which will be used
for integration into the normal mruby build process. *README.md* is a short
description of your GEM.
All GEMs have to be located under *$(MRUBY_ROOT)/mrbgems/g/*.
## Build process
mrbgems will call *make* to build and *make clean* to clean your GEM. You
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment