[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] ljc, a Lua to native executable compiler
- From: Javier Guerra Giraldez <javier@...>
- Date: Wed, 21 Sep 2016 20:46:36 +0100
On 21 September 2016 at 19:55, Samir Tine <firstname.lastname@example.org> wrote:
> it doesn’t translate Lua statements into machine code. Instead, it
> translates Lua source files to bytecode and uses the ljc runtime library.
> The ljcrt contains the virtual machine (Lua 5.3.3 or LuaJIT 2.1). ljc takes
> care of all required dependencies (Lua modules and Lua binary modules). It
> *does not* rely on any C compiler.
LuaJIT -b xx.lua xx.obj makes it trivial to bundle Lua + bytecode
in a self-contained executable. As an exercise, I've written a
Makefile that compiles and links any .lua or .c present in a src/
subdirectory, making it easy to create dependency-free executables,
just like Go.