Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Wrapper for the libjit just-in-time compiler library
Ruby C
Latest commit 9898f0a Paul Brannan Bumped version number.


:include: VERSION

Copyright (C) 2009 Paul Brannan

Ruby-libjit is a wrapper for the libjit library.  It provides basic
functionality for jit-compiling functions, including integrating those
functions as callable methods from within Ruby.  Abstractions are also
provided so that jit code may be written in a ruby-like manner.

Please see the file COPYING for license information.

To install it:

  gem install ruby-libjit

but you'll probably need to install libjit itself first (see below).

A simple example:

  :include: sample/simple.rb

Looping structures and other abstractions are provided to make writing
jit code easier:

  :include: sample/fib.rb

To build ruby-libjit, you will need to install libjit.  If it is not
available pre-compiled for your platform, you may build the latest
release like this:

  $ wget
  $ tar xvfz libjit-0.1.2.tar.gz
  $ cd libjit-0.1.2
  $ ./configure
  $ make
  $ sudo make install

For a more complete JIT framework and compiler for Ruby code, please
take a look at Ludicrous:

Something went wrong with that request. Please try again.