masterkain / macruby

Ruby 1.9 ported to run directly on top of Mac OS X core technologies. Trunk mirror.

This URL has Read+Write access

mattaimonetti@gmail.com (author)
Sat Sep 26 12:22:58 -0700 2009
commit  c5334fc05e7be0b0c8e3640819635b083ae49390
tree    4069cf76123734955b066b4d2340332dae087e41
parent  a3c1178ed251f38c1b547734c0f001cd6ea0721e
name age message
file .cvsignore Mon Feb 25 22:40:53 -0800 2008 added missing .document and .cvsignore files (f... [lsansonetti@apple.com]
file .document Mon Feb 25 22:40:53 -0800 2008 added missing .document and .cvsignore files (f... [lsansonetti@apple.com]
file .gitignore Loading commit data...
file COPYING Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
file GPL Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
file HACKING.rdoc Mon Sep 21 22:14:51 -0700 2009 move the AOT compilation of the stdlib into the... [lsansonetti@apple.com]
file LEGAL Mon Apr 13 13:25:07 -0700 2009 added autozone.h legal information git-svn-id:... [lsansonetti@apple.com]
file LGPL Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
file MacRuby.m Sun Jul 26 22:48:12 -0700 2009 forgot to initialize the compiler git-svn-id: ... [lsansonetti@apple.com]
file README.rdoc
file Rakefile
file TODO
file array.c
file b.rb Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
file bench.rb Tue Apr 07 18:24:23 -0700 2009 enabled tail-call elimination git-svn-id: http... [lsansonetti@apple.com]
directory benchmark/ Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
file bignum.c Fri Aug 14 04:59:46 -0700 2009 fix for bignums on Leopard git-svn-id: http://... [vincent.isambart@gmail.com]
directory bin/
file bridgesupport.cpp
file bridgesupport.h Fri Jun 19 17:57:44 -0700 2009 better version of last commit git-svn-id: http... [lsansonetti@apple.com]
file bs.c
file bs.h Sat Sep 19 00:37:35 -0700 2009 refreshed copyright for 2009 git-svn-id: http:... [mattaimonetti@gmail.com]
file bs_lex.h Tue Aug 11 04:40:10 -0700 2009 fixed compilation on Leopard git-svn-id: http:... [vincent.isambart@gmail.com]
file bs_struct_readers.c Wed Apr 22 17:55:53 -0700 2009 statically generate the struct reader methods, ... [lsansonetti@apple.com]
file class.c
file compar.c Tue Jul 07 19:52:12 -0700 2009 optimized dummy calls to <=>: git-svn-id: http... [lsansonetti@apple.com]
file compiler.cpp
file compiler.h
file complex.c Thu Aug 27 22:11:13 -0700 2009 added fixnum/float/complex support for the fast... [lsansonetti@apple.com]
file cont.c Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
directory data/ Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
file dir.c Wed Aug 05 16:17:55 -0700 2009 copying branches/experimental as trunk git-svn... [lsansonetti@apple.com]
file distruby.rb Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
file dln.c Fri Sep 25 17:14:56 -0700 2009 .rbo files are now initialized using a gcc cons... [lsansonetti@apple.com]
file dln.h Fri Sep 25 17:14:56 -0700 2009 .rbo files are now initialized using a gcc cons... [lsansonetti@apple.com]
file dmydln.c Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
file dmyencoding.c Sun May 18 01:10:19 -0700 2008 sync with ruby trunk r15665 git-svn-id: http:/... [lsansonetti@apple.com]
file dmyext.c Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
file dmytranscode.c Sun May 18 01:10:19 -0700 2008 sync with ruby trunk r15665 git-svn-id: http:/... [lsansonetti@apple.com]
file dtrace.d Sun Oct 05 20:18:10 -0700 2008 adding initial dtrace support, improved the GC ... [lsansonetti@apple.com]
file encoding.c
file enum.c Fri Sep 04 21:49:21 -0700 2009 fixing a bunch of minor IO bugs git-svn-id: ht... [lsansonetti@apple.com]
file enumerator.c Thu Sep 17 16:47:17 -0700 2009 rewrote the file loader (it was really time) + ... [lsansonetti@apple.com]
file error.c Tue Aug 25 18:35:19 -0700 2009 introduce rb_objc_define_module_function() whic... [lsansonetti@apple.com]
file eval.c
file eval_error.c Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
file eval_jump.c Tue Aug 25 18:35:19 -0700 2009 introduce rb_objc_define_module_function() whic... [lsansonetti@apple.com]
file eval_safe.c Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
directory ext/
file file.c
directory framework/ Wed Jun 11 20:04:36 -0700 2008 auto-generate the framework Info.plist file gi... [lsansonetti@apple.com]
file gc-stub.m Sat Sep 19 00:37:35 -0700 2009 refreshed copyright for 2009 git-svn-id: http:... [mattaimonetti@gmail.com]
file gc.c
file gcd.c
file gem_prelude.rb Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
file gen_bs_struct_readers.rb Wed Apr 22 17:55:53 -0700 2009 statically generate the struct reader methods, ... [lsansonetti@apple.com]
file golf_prelude.rb Sun May 18 01:10:19 -0700 2008 sync with ruby trunk r15665 git-svn-id: http:/... [lsansonetti@apple.com]
file hash.c
file id.c Wed Aug 26 18:51:00 -0700 2009 optimized rb_num_coerce_bin() calls + optimized... [lsansonetti@apple.com]
file id.h Wed Aug 26 18:51:00 -0700 2009 optimized rb_num_coerce_bin() calls + optimized... [lsansonetti@apple.com]
directory include/
file inits.c Fri Aug 28 16:29:06 -0700 2009 adding GCD API (only available on SnowLeopard) ... [lsansonetti@apple.com]
file instruby.rb
file io.c
file keywords Thu Jun 05 01:11:58 -0700 2008 merge with ruby trunk r16762 + better/faster ob... [lsansonetti@apple.com]
file lex.c.blt Thu Jun 05 01:11:58 -0700 2008 merge with ruby trunk r16762 + better/faster ob... [lsansonetti@apple.com]
file lex.c.src Thu Jun 05 01:11:58 -0700 2008 merge with ruby trunk r16762 + better/faster ob... [lsansonetti@apple.com]
file lgamma_r.c Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
directory lib/
file llvm.h Mon Aug 10 23:19:45 -0700 2009 adding a new optimized Array for default alloca... [lsansonetti@apple.com]
file load.c
file main.cpp Sat Sep 19 00:37:35 -0700 2009 refreshed copyright for 2009 git-svn-id: http:... [mattaimonetti@gmail.com]
file markgc.c Sat Sep 19 00:37:35 -0700 2009 refreshed copyright for 2009 git-svn-id: http:... [mattaimonetti@gmail.com]
file marshal.c Wed Sep 09 18:10:17 -0700 2009 adding missing write barriers git-svn-id: http... [lsansonetti@apple.com]
file math.c Tue Aug 25 18:35:19 -0700 2009 introduce rb_objc_define_module_function() whic... [lsansonetti@apple.com]
directory misc/
directory mspec/ Tue Sep 08 19:26:23 -0700 2009 a better macruby formatter that prints the pass... [lsansonetti@apple.com]
file numeric.c Thu Aug 27 22:11:13 -0700 2009 added fixnum/float/complex support for the fast... [lsansonetti@apple.com]
file objc.h Wed Aug 05 16:17:55 -0700 2009 copying branches/experimental as trunk git-svn... [lsansonetti@apple.com]
file objc.m
file object.c
directory onig/ Mon Aug 10 23:19:45 -0700 2009 adding a new optimized Array for default alloca... [lsansonetti@apple.com]
file pack.c Wed Aug 05 16:17:55 -0700 2009 copying branches/experimental as trunk git-svn... [lsansonetti@apple.com]
file parse.y
file prec.c Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
file prelude.rb Sun May 18 01:10:19 -0700 2008 sync with ruby trunk r15665 git-svn-id: http:/... [lsansonetti@apple.com]
file proc.c
file process.c Tue Aug 25 18:35:19 -0700 2009 introduce rb_objc_define_module_function() whic... [lsansonetti@apple.com]
directory rakelib/
file random.c Tue Aug 25 18:35:19 -0700 2009 introduce rb_objc_define_module_function() whic... [lsansonetti@apple.com]
file range.c Thu Sep 24 23:31:03 -0700 2009 fixed AOT compilation of literal ranges (object... [lsansonetti@apple.com]
file rational.c Sat Aug 01 19:00:15 -0700 2009 adding some TODOs git-svn-id: http://svn.macos... [lsansonetti@apple.com]
file re.c Wed Sep 09 00:09:55 -0700 2009 fixed AOT compilation of literal regexp to reta... [lsansonetti@apple.com]
file ruby.1 Sun May 18 01:10:19 -0700 2008 sync with ruby trunk r15665 git-svn-id: http:/... [lsansonetti@apple.com]
file ruby.c Fri Sep 25 18:59:38 -0700 2009 AOT objects function names are now provided by ... [lsansonetti@apple.com]
file rubytest.rb Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
file runruby.rb Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
directory sample-macruby/ Wed Aug 05 16:17:55 -0700 2009 copying branches/experimental as trunk git-svn... [lsansonetti@apple.com]
directory sample/ Wed Mar 11 14:14:13 -0700 2009 committing experimental branch content git-svn... [lsansonetti@apple.com]
file set.c
file signal.c Tue Aug 25 18:35:19 -0700 2009 introduce rb_objc_define_module_function() whic... [lsansonetti@apple.com]
directory spec/
file sprintf.cpp
file st.c Wed Sep 09 18:10:17 -0700 2009 adding missing write barriers git-svn-id: http... [lsansonetti@apple.com]
file string.c
file struct.c Wed Aug 05 16:17:55 -0700 2009 copying branches/experimental as trunk git-svn... [lsansonetti@apple.com]
directory test-macruby/ Mon Mar 16 14:30:13 -0700 2009 Removed the half implemented RubyCocoa layer fo... [eloy.de.enige@gmail.com]
directory test/ Mon Sep 14 10:15:13 -0700 2009 Added Rake to the list of external libraries to... [eloy.de.enige@gmail.com]
file test_vm.rb Thu Jun 25 11:09:46 -0700 2009 when loading a test file, append ./ this way it... [lsansonetti@apple.com]
directory test_vm/
file thread.c Sun Sep 06 18:38:32 -0700 2009 exposing missing Thread methods git-svn-id: ht... [lsansonetti@apple.com]
file thread_pthread.h Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
file time.c Tue Sep 08 19:25:45 -0700 2009 changed Time#_load again to conform to stupid r... [lsansonetti@apple.com]
directory tool/ Fri May 22 17:38:22 -0700 2009 the great schism, part I git-svn-id: http://sv... [lsansonetti@apple.com]
file transcode.c Mon Mar 30 16:42:49 -0700 2009 fixed the build (sorry guys) git-svn-id: http:... [lsansonetti@apple.com]
file transcode_data.h Mon Feb 25 12:18:21 -0800 2008 initial import git-svn-id: http://svn.macosfor... [lsansonetti@apple.com]
file util.c Thu Jul 30 23:46:57 -0700 2009 various unicode/bytestring fixes git-svn-id: h... [lsansonetti@apple.com]
file variable.c
file version.c Wed Dec 03 14:30:51 -0800 2008 fix for #173 (patch contributed by Vincent Isam... [lsansonetti@apple.com]
file version.h Wed Aug 05 16:17:55 -0700 2009 copying branches/experimental as trunk git-svn... [lsansonetti@apple.com]
file vm.cpp
file vm.h
file vm_eval.c Fri Aug 28 04:35:48 -0700 2009 fixed some of Laurent's strange code ;) git-sv... [vincent.isambart@gmail.com]
file vm_method.c Tue Aug 25 14:08:43 -0700 2009 fixed Module#method_defined? git-svn-id: http:... [lsansonetti@apple.com]
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 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.
  • LLVM ToT, compiled for both i386 and x86_64.

    LLVM is a moving target and breaks periodically. We recommend to install revision 82747.

      $ svn co -r 82747 https://llvm.org/svn/llvm-project/llvm/trunk llvm-trunk
      $ cd llvm-trunk
      $ ./configure
      $ UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make
      $ sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 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

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!