https://github.com/joequery/mrbc-playground
Playing with mruby's mrbc
https://github.com/joequery/mrbc-playground
Last synced: over 1 year ago
JSON representation
Playing with mruby's mrbc
- Host: GitHub
- URL: https://github.com/joequery/mrbc-playground
- Owner: joequery
- Created: 2012-09-07T00:38:31.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-11-15T11:22:30.000Z (over 13 years ago)
- Last Synced: 2025-01-07T00:56:46.253Z (over 1 year ago)
- Language: C
- Size: 114 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
mrbc playground
===============
mrbc, the mruby compiler, is a utility provided by the [mruby project][0]. 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
-----------------------------
Unix-like.
Installation
------------
Watch the [codestream](http://codestre.am/4f11323462f5c003a7bbecc07) to see the
installation process.
1. First, download [mruby][0].
2. Build mruby.
$ cd /where/you/downloaded/mruby
$ make
(Note that `make install` is not currently provided by mruby . The build
just happens within the project directory.)
3. Now clone this repo:
$ git clone git://github.com/joequery/mrbc-playground.git
4. Since the mruby project does not currently allow us to `make install`, we
need to adjust the `Makefile` of the mrbc playground project to reflect where
the mruby project resides on your system. Simply alter the first line of the
`Makefile` to read
MRUBY := /where/you/downloaded/mruby
Usage
-----
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 `rubyfile.rb`, run
$ make
The resulting executable, `rubyfile`, can now be run.
$ ./rubyfile
How it works
------------
TODO
[0]: https://github.com/mruby/mruby