All Projects → postmodern → mruby-embed

postmodern / mruby-embed

Licence: other
Example project that embeds mruby.

Programming Languages

ruby
36898 projects - #4 most used programming language
c
50402 projects - #5 most used programming language
HTML
75241 projects

mruby-embed

Example project that embeds mruby and Ruby code into a statically linked executable.

All Ruby code in the lib/ directory is compiled into mruby IR code using the mrbc utility. The IR code is then embedded in src/lib.c as an array of uint8_t data, which is loaded via mruby_load_ireps. All C code within src/ is then compiled and linked against libmruby.a, resulting in a static binary that runs the Ruby code.

Build

rake

Run

$ ./bin
>> 1 + 1
=> 2
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].