summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/mrbgems/README.md16
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/mrbgems/README.md b/doc/mrbgems/README.md
index da64446d7..c11e8a05f 100644
--- a/doc/mrbgems/README.md
+++ b/doc/mrbgems/README.md
@@ -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