Thursday April 26, 2012

Embedding Ruby on iOS

No, not MacRuby. MobiRuby, which is a port of mruby for iOS. Confused yet? :)

Like Lua, mruby (short for “minimalistic ruby”) is meant to be small, lightweight and easily embeddable. Lua is used frequently for things like scripting in video games and can already be embedded on iOS. Building off of Ruby’s C legacy means that it could be a really good fit for embedded scripting.

Don’t go into this expecting easy integration with Cocoa Touch, though. I’d recommend treating MobiRuby/mruby as embedded scripting to augment your app and encapsulate algorithms that would be a pain to write in Objective-C.