mrbc, the mruby compiler, is a utility provided by the mruby project. mrbc compiles your ruby program into byte code. The mruby project is still in preliminary stages, but they welcome issues and pull requests.
This project allows for quick/fun experimentation with the mrbc compiler by
taking care of the compiler/linker options for you. A simple
make, and your
ruby code is transformed into an executable!
Operating System Requirements
Watch the codestream to see the installation process.
- First, download mruby.
$ cd /where/you/downloaded/mruby $ make
make installis not currently provided by mruby . The build just happens within the project directory.)
Now clone this repo:
$ git clone git://github.com/joequery/mrbc-playground.git
Since the mruby project does not currently allow us to
make install, we need to adjust the
Makefileof the mrbc playground project to reflect where the mruby project resides on your system. Simply alter the first line of the
MRUBY := /where/you/downloaded/mruby
Now, feel free to replace the contents of
rubyfile.rb with basic Ruby code.
At this time, I'm currently unaware of the specific limitations of mruby vs
standard ruby, but you may likely encounter errors at some point.
After you've made your adjustments to
The resulting executable,
rubyfile, can now be run.
How it works