Building Mirah from the source.


To build Mirah, we need following packages:

  • git
  • java, javac
  • ant

XXX: installation instructions for each OSes here.

Download JRuby

Mirah is written in JRuby so we need the latest JRuby distribution to build the Mirah compiler.

$tar xvzf jruby-bin-1.5.2.tar.gz
$mv jruby-1.5.2 jruby

Note that you don’t need this step if you already have JRuby installed.

Check out sources

Next step is to checkout Mirah and Bitescript.
Bitescript is a ruby library used by the Mirah compiler.

Both can be checked out from github.

$ git clone
$ git clone

Build Mirah

Now we can build Milar binary using jruby.

$cd ./mirah
$ ../jruby/bin/jruby -S rake jar

Run and Compile a Mirah Script

mirah command is a jruby script, which is available at ./bin:

$echo 'puts "hello"' > hello.mirah
$ PATH=$PATH:../jruby/bin/ ./bin/mirah hello.mirah 

For building java classes, mirahc is also available.

$ PATH=$PATH:../jruby/bin/ ./bin/mirahc hello.mirah
$ java Hello # The compiled class is stored as ./Hello.class

Having a trouble?
Consult .