RubyMotion is a toolchain that lets Ruby developers write iOS and Android apps. Internally RubyMotion features 2 distinct implementations of the Ruby language (one for the Objective-C runtime and one for the JVM) as well as a static compiler written with LLVM. In this presentation, we will dig inside RubyMotion and see how everything works, from unified runtimes to static and dynamic (JIT) compilation strategies.
This presentation will focus on RubyMotion internals. It will not cover iOS or Android development. It will not focus on Ruby as a development language as well.
We will start by introducing RubyMotion then explain how it works. We will do quick overviews of the 2 Ruby runtimes included in RubyMotion, which are full implementations of Ruby, and explain design and implementation decisions.
Following up, we will explain how RubyMotion apps are statically compiled into machine code. We will have a look inside the RubyMotion compiler, written in LLVM, and we will explain how a dynamic language such as Ruby gets compiled statically. We will look at a few optimization passes.
Finally, if we have time, we will show up a few exciting use cases of the LLVM JIT, used to implement the REPL (irb) in RubyMotion.
Speakers: Laurent Sansonetti