LuaJIT on iOS

Someone created a fork, which essentially adds a script to build LuaJIT for the several architectures needed by iOS, then combines them using lipo: github.com/cailei/luajit.

I updated the script by taking the latest SDK versions and removing the reference to gcc inside the Xcode bundle:

The script works seamlessly with LuaJIT 2.0.4.

Unfortunately, LuaJIT does not support the arm64 architecture yet.

3 thoughts on “LuaJIT on iOS”

  1. You mention that this doesn’t support arm64 yet. Do you know why exactly that is? What’s the problem with arm64?

    1. From what I recall from a discussion on a forum, since a Just-in-Time compiler is a low-level piece of software, using the special instruction set of the Arm-64 needs extra work. The original author of LuaJIT had no time to tackle the problem, so the work of other contributors was needed.

      There is a presentation of someone who did work on the problem, and his work made its way into the latest betas. So you may either try the latest beta, or wait until the next minor version is released (around June if my memory is correct).

      1. Or you may stick with the regular Lua, which is what I did, if this is not too much of a constraint for you (if you don’t care too much about speed and you don’t need the C Foreign Interface).

Comments are closed.