lua-users home
lua-l archive

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


Hi Marc,

> Is it possible in pure Lua to compile Lua source code to bytecode and dump the resulting binary bytecode to file?

string.dump does it:
http://www.lua.org/manual/5.3/manual.html#pdf-string.dump; the
generated bytecode is subject to portability constraints.

Paul.

On Sat, Sep 19, 2015 at 10:36 AM, Marc Balmer <marc@msys.ch> wrote:
> Is it possible in pure Lua to compile Lua source code to bytecode and dump the resulting binary bytecode to file?
>
> Or must I use C and the lua_dump() function?
>