ColdRuby virtual machine
The API provided is, by an interesting coincidence, very similar to the
Ruby C API (I, the author of ColdRuby, personally think that it is one
of the best C APIs ever). It still may undergo major changes, so it
won't be documented now; you can look in a generic runtime class
runtime/05_hash.js) or in the Ruby runtime
Currently there are two modes of operation: standalone and pure
some differences in internal format of bytecode, which is parsed in
ColdRuby, I should note that everything is currently tested on
1.9.2-p136. The bytecode version used is
[1, 2, 1].
Using standalone interpreter
Standalone interpreter is based on V8 engine; as such, you will need
the developer files for that library. They are contained in package
libv8-dev on Debian.
The build process is based on standard autoconf utilites.
If you've checked out the git version, you will need to run
in the root of repository; if you do not want to install it to your system,
but rather use from the build directory, you should pass
--enable-developer-mode flag to configure script.
To build, just run
./configure && make.
After the build has finished, you can execute scripts with the binary located
You can use the executable to generate the code for Chrome browser or NodeJS.
To do that, you'll need to pass the
-s option. If you'll specify a filename
(note that getopt expects it to be joined with the option, i.e.
-sfilename.js), the compiled code will be written to that file. Then, you
Some examples of code runnable in browser and NodeJS will be provided once the extension API will mature.