[snip]
I'm convinced that the best route to byte order or cross-compiling is
third-party dump/undump pairs. The files ldump.c and lundump.c are
completely replaceable; they export a single, well-defined, entry point.
The format of precompiled chunks is not sacred at all; you can use any
format, as long as ldump.c and lundump.c agree about it. (For instance,
Rici Lake is considering writing a text format for precompiled chunks.)
For the Lua core, I prefer a simple and fast one. For cross-compiling,
it should be simple to change ldump.c for instance. We just have to wait
till someone writes it and makes it available.