Skip to content
This repository

MacRuby is an implementation of Ruby 1.9 directly on top of Mac OS X core technologies such as the Objective-C runtime and garbage collector, the LLVM compiler infrastructure and the Foundation and ICU frameworks.

Fetching latest commit…

Cannot retrieve the latest commit at this time

benchmark committing experimental branch content
framework committing experimental branch content
icu-1060 bye bye oniguruma, started ICU regexps
misc do not load rb_main.rb twice (second try)
mspec Update MSpec to 26e2543
rakelib adding xmlrpc to the AOT list
sample committing experimental branch content
test-macruby Removed the half implemented RubyCocoa layer for now at least. Need t…
test Added Rake to the list of external libraries to test.
test_vm add one more test
.cvsignore removed autogenerated files
.document removed autogenerated files
.gitignore Remove local rubyspec temp dir before run. Added it to gitignore.
COPYING committing experimental branch content
GPL committing experimental branch content
HACKING.rdoc added a section about code design
LEGAL added autozone.h legal information
LGPL committing experimental branch content
MacRuby.m cleaning a bit public headers, added support for methods defined for …
MacRubyDebuggerConnector.h fixed internal debugger interpreter path
MacRubyDebuggerConnector.m fixed internal debugger interpreter path
NSNumber.m started NSNumber / NSString extensions
README.rdoc mention that SL is recommended
Rakefile ignore RUBYOPT
TODO refreshed
array.h added xmalloc_ptrs() function and use it when it's necessary
auto_zone_1060.h Added 2010 Copyrights
b.rb committing experimental branch content
bench.rb enabled tail-call elimination
bignum.c revert r3806 because it breaks the specs and it also smells like a ba…
bridgesupport.h Added 2010 Copyrights
bs.h Add support for Proc as function pointers (BridgeSupport only)
bs_lex.h fixed compilation on Leopard
bs_struct_readers.c statically generate the struct reader methods, 128 seems necessary at…
compar.c optimized dummy calls to <=>:
complex.c bye bye oniguruma, started ICU regexps
cont.c committing experimental branch content
debugger.cpp Kernel#caller: now honor the skip argument
debugger.h experimental debugger
dir.c cleaning a bit public headers, added support for methods defined for …
distruby.rb committing experimental branch content
dln.c .rbo files are now initialized using a gcc constructor instead of an …
dln.h .rbo files are now initialized using a gcc constructor instead of an …
dmydln.c committing experimental branch content
dmyencoding.c committing experimental branch content
dmyext.c committing experimental branch content
dmytranscode.c committing experimental branch content
dtrace.d removed the insn__entry and insn__return probes now that yarv is gone
encoding.c added #default_external=, #default_internal=
encoding.h Make Symbol NSCoding compliant
enum.c fixing a bunch of minor IO bugs
enumerator.c Make sure #to_enum verify param is a symbol
env.c moved the ENV stuff into a separate file
error.c Use the same message format for printed exceptions everywhere.
eval_error.c committing experimental branch content
eval_jump.c call at_exit blocks within exception handlers
eval_safe.c committing experimental branch content
file.c fixed File.join
gc-stub.m Added 2010 Copyrights
gem_prelude.rb Updated RubyGems to 1.3.5
gen_bs_struct_readers.rb statically generate the struct reader methods, 128 seems necessary at…
golf_prelude.rb committing experimental branch content
hash.h completed Array refactoring, cleaned out a few things
id.c better ignored sel detection
id.h better ignored sel detection
inits.c a new Symbol class, unicode-aware + refactored/cleaned symbol generation
instruby.rb find llc using rbconfig's LLVM_PATH
keywords committing experimental branch content
lex.c.blt committing experimental branch content
lex.c.src committing experimental branch content
lgamma_r.c committing experimental branch content
llvm.h emit dwarf metadata at compilation time and use it to establish backt…
load.c revert bad change introduced by thibault
main.cpp Added 2010 Copyrights
markgc.c Added 2010 Copyrights
math.c introduce rb_objc_define_module_function() which mimics the ruby spec
mt.c integrate Mersenne Twister based random number generator from 1.9 ups…
pack.c #pack: fixed tainting of resulted string
prec.c committing experimental branch content
prelude.rb committing experimental branch content
process.c set the maxgroups constant to NGROUPS_MAX
rational.c bye bye oniguruma, started ICU regexps
re.cpp added #names and #names_captures (atm returning empty collections)
re.h always use ucs2 mode, added shared regexp matchers for #gsub, #scan a…
ruby.1 committing experimental branch content
ruby.c expose the bstr APIs
rubyc.1 Typo in rubyc man page
rubytest.rb committing experimental branch content
runruby.rb committing experimental branch content
signal.c remove unused include directives
sprintf.c fixed a few bugs in #sprintf
struct.c introduce RubyHash, fix a lot of minor bugs, start cleaning process
symbol.c Make Symbol NSCoding compliant
symbol.h a new Symbol class, unicode-aware + refactored/cleaned symbol generation
test_vm.rb Fixed a few test_vm tests that were incorrect (compared to 1.9)
thread.c don't always assume that a thread as a group
time.c expose the bstr APIs
transcode.c fixed the build (sorry guys)
transcode_data.h committing experimental branch content
ucnv.c some work on string
util.c ruby_getcwd() should return a RubyString now
version.c MACRUBY_VERSION is now a string
vm_method.c Kernel#respond_to_missing?: added


MacRuby is a Ruby implementation based on Mac OS X technologies, such as the Objective-C runtime and garbage collector, the CoreFoundation framework and the LLVM compiler infrastructure.

It is the goal of MacRuby to enable the creation of full-fledged Mac OS X applications which do not sacrifice performance in order to enjoy the benefits of using Ruby.

MacRuby is copyrighted free software by Apple Inc and covered by the terms of the Ruby license. Please refer to the COPYING file for more information.

The project website contains more documentation, such as tutorials and guides:


  • An Intel machine. PowerPC machines are not supported anymore, but may still work. An Intel 64-bit machine (Intel Core Duo 2) is recommended.

  • Mac OS X 10.5.6 or later. Mac OS X 10.6 or later is recommended.

  • LLVM ToT, compiled for both i386 and x86_64.

    LLVM is a moving target and breaks periodically. We recommend to install revision 89156, being sure to specify the correct C and C++ compilers through environment variables.

    $ svn co -r 89156 llvm-trunk
    $ cd llvm-trunk
    $ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ ./configure --enable-bindings=none --enable-optimized --with-llvmgccdir=/tmp
    $ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make
    $ sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ make install

    Note that compiling LLVM can take quite a while. If you have a machine with multiple cores, which is quite likely, you might want to speed up the process by using all/more cores. However, doing this can make your machine unresponsive during compilation. To use multiple cores pass the `-j N' option, where `N' stands for the number of cores you'd like to use. So for a Core Duo the command would look like:

    $ UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make -j2

Build Instructions

You can build MacRuby by doing the following command:

$ rake

Or, as with LLVM, you can specify the amount of jobs to run simultaneously:

$ rake jobs=2

Once done, you can run the RubySpec-based regression tests as well as the performance suite:

$ rake spec:ci
$ rake bench:ci

To install MacRuby on your machine:

$ sudo rake install

Then you should be all set! Please report us any problem you will find (the website has pointers). Thanks!

Something went wrong with that request. Please try again.