-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
43 lines (28 loc) · 1.1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Ruby-libjit
: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 ftp://ftp.gnu.org/gnu/dotgnu/libjit/libjit-0.1.2.tar.gz
$ 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:
http://rubystuff.org/ludicrous/