summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorDaniel Bovensiepen <[email protected]>2012-11-24 14:33:19 +0800
committerDaniel Bovensiepen <[email protected]>2012-11-24 14:33:19 +0800
commite9f87368825dc7061035bdc51e45f7d8f9ef66c9 (patch)
tree46b45b5717c87299e7e1aec5b5610b80756bb5a5 /doc
parentb6a102481a588e73d0f74c4973c9ceeb8d0bb7ba (diff)
downloadmruby-e9f87368825dc7061035bdc51e45f7d8f9ef66c9.tar.gz
mruby-e9f87368825dc7061035bdc51e45f7d8f9ef66c9.zip
Add usage documentation for mrbgems
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