With only 3 minor changes to the sources of Lua 4.0, it can be compiled without using make or libraries (on Linux for now). The basic idea is to create a file "xall.c" with lines of the form: #include "lapi.c" #include "lcode.c" [...] #include "lib/lauxlib.c" #include "lib/lbaselib.c" [...] Then, all one needs to be able to embed lua, is add: #include "clua.c" to the application or module, plus a few lines of code to init and open all libs needed.

This has been taken further by collecting all source files into one, merging local headers once (see http://www.equi4.com/lux/onesrc.tcl). The result is a single source file, containing all of Lua's code as well as optional support libs. Imagine how much simpler distribution of the Lua source could become...

This source file has been used to build 3 standalone variants:

On Linux, sizes are currently (after UPX-compression): luxs < 200 Kb, luxr < 50 Kb (both include several extension libs for Lua), and luxm < 20 Kb.

The Lux project now has a home at http://www.equi4.com/lux/ - see also Let there be Lux on this wiki.

-jcw


Last modified
2001-02-17

(216.232.136.162)

Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated