lua-users home
lua-l archive

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


This has been discussed several times here. See the archives at
	http://lua-users.org/lists/lua-l/

Look for "cross", "luac", "lundump", etc.

See for instance
	http://lua-users.org/lists/lua-l/2011-04/msg00882.html

> we target many platforms with the software that embeds Lua.
> For some of them it is more practical to cross compile on another
> system than setting up and running the builds on the target.

Depending on the differences between these platforms, this can be
easily achieved by modifying ldump.c or lundump.c.

See for instance
	http://lua-users.org/lists/lua-l/2005-06/msg00019.html

If you can tell us precisely what the differences between the platforms are,
then we can try to give a better answer. In particular, if the difference
is mostly endianness, then it's easy and there is code in the archives for
handling that.
 
> Is a platform independent byte-code desirable?

The purpose of precompiling Lua scripts is fast loading. If you're going
to complicate the loader (lundump.c) then this will be probably lost.

The bottom line is that the Lua parser and code generator is very fast.
Text source remains the ultimate platform-independent form for Lua scritps.