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

Download latest Android NDK for Mac OS X (intel)

Unarchive it to home ~/android-ndk-r8c

# 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

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

and build mruby

ruby minirake

Optional