Serg Podtynnyi : home  blog  projects  links  contacts 

Build mruby for Android

mruby – Minimalistic Ruby and Its Possibility Matz

If you like playing with cool new stuff and have Android device here is the instructions of how to build mruby for Android using Android NDK arm toolchain. The goal was to use less custom stuff and make less modifications to original build process.

Note: These instructions are for Mac OS X. The procedure is similar for other *nix.

mruby source

  • Clone mruby from GitHub
git clone git://github.com/mruby/mruby.git

Android NDK

# Make symlink
ln -s ~/android-ndk-r8c ~/android-ndk
# Make custom standalone toolchain as described here (~/android-ndk/docs/STANDALONE-TOOLCHAIN.html)
cd ~/android-ndk/
build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=/tmp/android-14-toolchain
# Export var used by android toolchain cmake file
# Add this line to your ~/.profile file for future use
export ANDROID_STANDALONE_TOOLCHAIN=/tmp/android-14-toolchain

Update 10 Feb 2013:

# Add to your build_config.rb
 MRuby::CrossBuild.new('androideabi') do |conf|
   toolchain :androideabi
 end

and build mruby

ruby minirake

Optional

blog comments powered by Disqus