Simple example of mruby embedded in a C application
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
mruby @ 2cca9d3
test_output
.gitignore
.gitmodules
LICENSE
Makefile
README.md
class_under_module.c
class_under_module_mrb.rb
run_tests.sh
simple_class.c
simple_class_mrb.rb
simple_module.c
simple_module_mrb.rb
simple_yield.c
simple_yield_mrb.rb
simplest.c
simplest_mrb.rb

README.md

Embedding mruby in C

Simple example of mruby embedded in a C application

To get started with the simplest example you can do the following:

git clone --recursive https://github.com/carsonmcdonald/mruby-c-example.git
cd mruby-c-example
make
./simplest

Examples

  • simplest - Simply load and run a script
  • simple_class - Create a class and use it in a script
  • simple_module - Create a module and use it in a script
  • class_under_module - Create a class under a module and use it in a script
  • simple_yield - Create a method that yields to a given block