lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 21 September 2016 at 19:55, Samir Tine <samir.tine@gmail.com> 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[1]   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.


[1]: http://repo.or.cz/w/luajit-2.0.git/blob_plain/v2.1:/doc/running.html


-- 
Javier