[erlang-questions] LuaJIT on Erlang

Roger Lipscombe roger@REDACTED
Wed Aug 17 19:58:06 CEST 2016

On 17 August 2016 at 18:52, Arshad Ansari <arshadansari27@REDACTED> wrote:
> Hello there,
> We have existing business logic in Lua, which is a lot of scripts. We've
> been using it by calling it from C (freediameter) and through LuaJIT. Beam
> is much slower when compared to LuaJIT execution (as claimed by many) and
> I'm now tasked with making erlang to work with those lua scripts but not
> using lua only. Rather, it has to be using LuaJit. Every example I've seen
> using luerl and other such libraries are directly executing lua and I'm not
> able to find a way to do the same with JIT. Can anyone point me in right
> direction?

I *think* that you'll need to continue to use the LuaJIT runtime from
C, so you'd be looking at the usual ways to talk to C from Erlang.
That is: ports, port drivers, C nodes or NIFs. Start here:

Robby Raschke did it with a C Node:

fwiw, we embed Squirrel (inspired by Lua; see
http://squirrel-lang.org/) in our Erlang nodes by using a NIF.

More information about the erlang-questions mailing list