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.
Ruby C C++ Bison Objective-C Emacs Lisp Other
Permalink
Failed to load latest commit information.
bin Make ruby_deploy cleanup .rb files properly when using --compile Sep 29, 2012
ext follow changes in ruby/ruby@65ca601 Feb 22, 2013
framework committing experimental branch content Mar 11, 2009
icu-1060/unicode ignore warning of return-type-c-linkage in ICU header for clang Jul 17, 2012
include implement rb_hash_delete_if() Jan 7, 2013
lib Update minitest to 4.3 to match CRuby 2.0 Dec 12, 2012
misc Make installer setup Xcode integration as root Oct 2, 2012
mspec update mspec to 69c388b1187789f4996eda7dec4c1404fcd6b742 Apr 6, 2013
perf add perf_string.rb to do benchmark of string Mar 1, 2012
plblockimp just compile plblockimp when need it Aug 7, 2012
rakelib use macruby.mspec for `rake spec:list' task Apr 25, 2013
sample-macruby update README.rdoc in sample-macruby Aug 4, 2012
sample committing experimental branch content Mar 11, 2009
spec update spec's tag May 19, 2013
test-macruby Remove references to hotcocoa from the MacRuby sources Apr 15, 2011
test-mri follow changes in ruby/ruby@65ca601 Feb 22, 2013
test_vm implemented rb_provided() and rb_feature_provided(). these come from … Sep 19, 2011
tool removed rb_nibtool.old Mar 21, 2011
.document Make macri parse all relevant source files (GH-85) May 31, 2012
.gdbinit add GDB trick Jun 19, 2012
.gitignore rename the architecture name to i386 from invalid X86_32 Jul 12, 2012
BSDL update copyright in BSDL Jun 4, 2012
COPYING update to new ruby license Oct 17, 2011
ChangeLog.markdown update ChangeLog Aug 28, 2012
GPL committing experimental branch content Mar 11, 2009
HACKING.rdoc add GDB trick Jun 19, 2012
LEGAL Move plblockimp license information to LEGAL May 25, 2012
LGPL committing experimental branch content Mar 11, 2009
MacRuby.m Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
MacRubyDebuggerConnector.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
MacRubyDebuggerConnector.m Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
NSArray.m improve a performance in Array#hash Jan 26, 2013
NSDictionary.m [fix #165] remove the check of whether receiver is mutable in NSDicti… Nov 9, 2012
NSString.m Symbol#dup raises a TypeError Jun 22, 2012
README.rdoc Add indefinite hiatus notice to README.rdoc Jan 3, 2015
Rakefile Remove xcode_support from the standard rakefile installation Aug 25, 2012
TODO Remove instruby.rb now that porting is complete Jan 19, 2012
array.c fix a bug in Array() where it will return incorrected value if passed… Jul 5, 2013
array.h move the implementation about #hash from Array to NSArray, in order t… Sep 25, 2012
auto_zone_1060.h Fix auto_zone header for SL May 25, 2010
b.rb now compile some of the VM primitives into bitcode that will be added… May 24, 2010
bignum.c suppress warning of loop empty body Jul 16, 2012
bridgesupport.cpp use pre-increment for C++ iterator Feb 8, 2013
bridgesupport.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
bs.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
bs.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
bs_lex.h fixed compilation on Leopard Aug 11, 2009
bs_struct_readers.c statically generate the struct reader methods, 128 seems necessary at… Apr 23, 2009
class.c use MACRUBY_STATIC for rb_undef_alloc_func May 19, 2013
class.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
compar.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
compiler.cpp use pre-increment for C++ iterator Feb 8, 2013
compiler.h should not raise an exception, so implement vm_fast_mod(). fix #1471 May 15, 2012
complex.c Remove unused static selector from complex.c Jan 3, 2013
cont.c include/ruby/macruby.h -> macruby_internal.h Jan 8, 2011
debugger.cpp Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
debugger.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
dir.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
dispatcher.cpp not coerce an inline expansion Apr 21, 2013
distruby.rb committing experimental branch content Mar 11, 2009
dln.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
dln.h .rbo files are now initialized using a gcc constructor instead of an … Sep 26, 2009
dmydln.c committing experimental branch content Mar 11, 2009
dmyencoding.c committing experimental branch content Mar 11, 2009
dmyext.c committing experimental branch content Mar 11, 2009
dmytranscode.c committing experimental branch content Mar 11, 2009
dtrace.d removed the insn__entry and insn__return probes now that yarv is gone Oct 9, 2009
encoding.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
encoding.h fix the struct declarations Jun 19, 2012
encoding_ucnv.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
enum.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
enumerator.c use RARRAY_LENINT() to pass the value into int type arguments Jul 18, 2012
env.c ENV#[]= raises an exception if the key contains the '=' like a 'foo=' Jun 21, 2012
error.c add rb_vm_check_call() and use its function to check/call the method Jul 19, 2012
eval.c add rb_vm_check_call() and use its function to check/call the method Jul 19, 2012
eval_error.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
eval_jump.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
eval_safe.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
exported_symbols_list should not raise an exception, so implement vm_fast_mod(). fix #1471 May 15, 2012
file.c File::Stat#inspect will not raise an exception if passed uninitialize… Aug 24, 2012
gc-stub.m use __clang__ instead of __GNUC__ Feb 17, 2013
gc.c add BasicObject#__id__ Apr 23, 2013
gcd.c Make Dispatch::Queue#apply documentation less misleading Aug 25, 2012
gcd.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
gen_bs_struct_readers.rb statically generate the struct reader methods, 128 seems necessary at… Apr 23, 2009
golf_prelude.rb committing experimental branch content Mar 11, 2009
hash.c implement rb_hash_delete_if() Jan 7, 2013
hash.h fix the struct declarations Jun 19, 2012
id.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
id.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
inits.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
interpreter.cpp Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
interpreter.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
io.c Object#display will raise an exception if passed nil Jul 31, 2012
irb.1 Add "See Also" sections May 21, 2010
kernel.c fix an overflow by multiplying May 15, 2012
keywords committing experimental branch content Mar 11, 2009
lex.c.blt committing experimental branch content Mar 11, 2009
lex.c.src committing experimental branch content Mar 11, 2009
lgamma_r.c committing experimental branch content Mar 11, 2009
llvm.h now depend on revision 127367 of branch LLVM 2.9 Mar 11, 2011
load.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
macruby_internal.h Use plblockimp to provide imp_implementationWithBlock() for OS X 10.6… May 25, 2012
main.cpp Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
markgc.c update copyrights to 2011 Jan 15, 2011
marshal.c keep the Object's status of untrusted Jul 28, 2012
math.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
mt.c integrate Mersenne Twister based random number generator from 1.9 ups… Feb 13, 2010
numeric.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
objc.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
objc.m Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
object.c add the implementation of Object#singleton_class Aug 19, 2012
pack.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
parse.y RSTRING_PTR() returns (char *) instead of (const char *) like CRuby b… Aug 18, 2012
prec.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
proc.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
process.c RSTRING_PTR() returns (char *) instead of (const char *) like CRuby b… Aug 18, 2012
random.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
range.c [fix #172] fix the Range#each where does not accept the range object … Nov 23, 2012
rational.c remove the unused definition Jul 16, 2012
re.c refactor Jun 20, 2013
re.h loop unrolling to improve the Objective-C methods performance in Stri… Jun 20, 2013
ruby.1 committing experimental branch content Mar 11, 2009
ruby.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
ruby_deploy.1 cover new --gem and --bs options Feb 10, 2011
rubyc.1 Added some linker options to rubyc Aug 27, 2010
rubyd.1 Add "See Also" sections May 21, 2010
rubytest.rb committing experimental branch content Mar 11, 2009
runruby.rb committing experimental branch content Mar 11, 2009
sandbox.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
signal.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
sprintf.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
st.c fix incorrect using of GC_WB() Jan 4, 2012
strftime.c move PRI_TIMET_PREFIX definition into ruby.h Jul 5, 2012
string.c refactor Jun 20, 2013
struct.c use RARRAY_LENINT() to pass the value into int type arguments Jul 18, 2012
symbol.c implement Symbol#succ Jun 23, 2012
symbol.h Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
test_vm.rb supported show known problems. Apr 12, 2011
thread.c Thread.new will be accepted even if ThreadGroup#add is not accepted b… Aug 17, 2012
time.c [fix #174] use rb_vm_call instead of rb_funcall to avoid an issue #17… Jan 3, 2013
timev.h update MacRuby's older Time class with CRuby 1.9.2 Jun 16, 2012
transcode.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
ucnv.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
util.c made static to get rid of name clash Jan 18, 2012
variable.c [fix #208] fix a bug where set a constant which it will not raise an … Apr 13, 2013
version.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012
version.h Flip RELEASE_YEAR and BIRTH_YEAR so RUBY_COPYRIGHT makes sense Aug 25, 2012
vm.cpp fix a bug in defined?(super) which returns the incorrect value if use… Jun 17, 2013
vm.h fix a bug in respond_to_key which cannot generate a unique key for di… Mar 10, 2013
vm_eval.c use RARRAY_LENINT() to pass the value into int type arguments Jul 18, 2012
vm_method.c Change ownership to The MacRuby Team and update copyrights Apr 23, 2012

README.rdoc

MacRuby

Note: Due to Apple’s abandonment of the Objective-C Garbage Collector (libauto) which MacRuby relied heavily on, future development of MacRuby is on an indefinite hiatus. If you would like to develop applications for iOS and OS X please check out RubyMotion, the spiritual successor to the MacRuby project.

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 the MacRuby team 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>

Note for using Xcode 4.3 (or later)

If you use the Xcode 4.3 (or later), you might need to configure Xcode path before installing MacRuby:

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

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 # --quiet

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!