mruby library bindings for Crystal. Currently only unsafe, generated bindings. Very much a work-in-progress.
MIT License
mruby library bindings for Crystal. Currently only unsafe, generated bindings. Very much a work-in-progress.
llvm
and any dependencies required for mruby on your platformbrew install llvm
will install the required dependenciesAdd the dependency to your shard.yml
:
dependencies:
mruby:
github: maxfierke/mruby.cr
Run shards install
Run cd lib/mruby && make
to generate the lib binding.
(May want to do this in your Makefile
or other build configuration)
require "mruby"
mrb = LibMRuby.mrb_open
code = "5.times { puts 'mruby is awesome!' }"
LibMRuby.mrb_load_string(mrb, code)
LibMRuby.mrb_close(mrb)
See src/lib_mruby.cr
once generated to view exposed methods (currently only those from mruby.h
and mruby/compile.h
)
gnu-sed
is installed. (e.g. brew install gnu-sed
)make
to generate the lib bindingsmake spec
to run the testsgit checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)