Home > MacRuby-mirror-test

MacRuby-mirror-test

MacRuby-mirror-test is a project mainly written in RUBY and C, based on the View license.

== MacRuby

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: http://macruby.org

=== Requirements

  • 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.6 or later.

  • LLVM ToT, compiled for both i386 and x86_64.

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

    $ svn co -r 106781 https://llvm.org/svn/llvm-project/llvm/trunk 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, whereN' stands for the number of cores you'd like to use. So for a Core Duo the command would look like:

    $ env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" CC=/usr/bin/gcc CXX=/usr/bin/g++ 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 http://macruby.org website has pointers). Thanks!