Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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.

This branch is 8 commits ahead, 1049 commits behind MacRuby:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
ext
framework
icu-1060/unicode
include
lib
misc Make Deployment target depend on main target
mspec
perf
rakelib
sample-macruby
sample
spec
test-macruby
test-mri add skip in UnitTest.
test_vm
tool
.document
.gitignore Improve user friendliness of running the MRI tests
COPYING
GPL
HACKING.rdoc
LEGAL
LGPL committing experimental branch content
MacRuby.m update copyrights to 2011
MacRubyDebuggerConnector.h
MacRubyDebuggerConnector.m
NSArray.m
NSDictionary.m
NSString.m
README.rdoc Add contribute section to README.
Rakefile
TODO
array.c
array.h
auto_zone_1060.h
b.rb
bignum.c
bridgesupport.cpp add a GC_WB() macro in bridgesupport.cpp
bridgesupport.h
bs.c
bs.h
bs_lex.h
bs_struct_readers.c
class.c
class.h
compar.c
compiler.cpp
compiler.h fixed below.
complex.c
cont.c
debugger.cpp
debugger.h
dir.c fix memory leaks in Dir.new
dispatcher.cpp
distruby.rb
dln.c
dln.h
dmydln.c
dmyencoding.c
dmyext.c
dmytranscode.c
dtrace.d
encoding.c implement ENCODING_SET() CRuby API
encoding.h add NSString#encode which returns a properly encoded RubyString, and …
encoding_ucnv.h String#rindex should work better (even though it may be a bit slower …
enum.c
enumerator.c
env.c
error.c
eval.c
eval_error.c update copyrights to 2011
eval_jump.c fix a bug in #at_exit when the process would abort if a block raised …
eval_safe.c
exported_symbols_list
file.c use the xfree() when deallocate the memory using xmalloc().
gc-stub.m update copyrights to 2011
gc.c some work on garbage collecting singleton classes - disabled for now …
gcd.c
gcd.h update copyrights to 2011
gem_prelude.rb Updated RubyGems to 1.3.5
gen_bs_struct_readers.rb
golf_prelude.rb committing experimental branch content
hash.c
hash.h
id.c
id.h some work on garbage collecting singleton classes - disabled for now …
inits.c
instruby.rb
interpreter.cpp
interpreter.h
io.c revert my previous commit (d5d1e6f). because IO#read is broken after …
irb.1 Add "See Also" sections
kernel.c
keywords
lex.c.blt
lex.c.src
lgamma_r.c
llvm.h now depend on revision 127367 of branch LLVM 2.9
load.c
macruby_internal.h
main.cpp update copyrights to 2011
markgc.c
marshal.c
math.c
mt.c
numeric.c
objc.h
objc.m
object.c
pack.c
parse.y
prec.c
proc.c fixed below.
process.c fix the typo, rb_exec_arg_init() needs a boolean.
random.c
range.c
rational.c
re.c
re.h fix a bug of Regexp#match. Regexp#match(str, pos) was broken when was…
ruby.1 committing experimental branch content
ruby.c array.c, bs.c
ruby_deploy.1
rubyc.1
rubyd.1 Add "See Also" sections
rubytest.rb
runruby.rb
sandbox.c update copyrights to 2011
signal.c update copyrights to 2011
sprintf.c
st.c fix problems detected by the clang lto
string.c
struct.c update copyrights to 2011
symbol.c
symbol.h
test_vm.rb
thread.c
time.c
transcode.c add NSString#encode which returns a properly encoded RubyString, and …
ucnv.c
util.c fix clang build
variable.c
version.c
version.h trunk is now 0.11
vm.cpp
vm.h
vm_eval.c
vm_method.c fix Module objects to not inherit from Object, to behave like CRuby

README.rdoc

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

Requirements

  • An Intel 64-bit machine. PowerPC and Intel 32-bit machines are not supported anymore, but may still work.

  • Mac OS X 10.6 or later.

  • LLVM ToT, compiled for x86_64.

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

    $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_29@127367 llvm-2.9
    $ cd llvm-2.9
    $ env CC=/usr/bin/gcc CXX=/usr/bin/g++ ./configure --enable-bindings=none --enable-optimized --with-llvmgccdir=/tmp
    $ env CC=/usr/bin/gcc CXX=/usr/bin/g++ make
    $ sudo env 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:

    $ env CC=/usr/bin/gcc CXX=/usr/bin/g++ make -j2

    If you would prefer to update an existing LLVM Subversion working copy you need to be careful to remove any previous build files before you compile:

    $ svn status --no-ignore | awk '{print $2}' | xargs rm -rf
    $ svn revert -R .
    $ svn switch <repository-URL>

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 macruby.org website has pointers). Thanks!

Contribute

Once you've made your great commits:

  1. Fork MacRuby

  2. Create a topic branch - git checkout -b my_branch

  3. Push to your branch - git push origin my_branch

  4. Create a pull request: github.com/USERNAME/MacRuby/pull/new/master

  5. That's it!

Something went wrong with that request. Please try again.