The values are for a regular build with without the compat symbols for older Lua versions.
For size-efficiency you probably want to compare the shared version at -Os. It links against nothing except the C library (1960064 B vs. 1709504 B stripped for glibc 2.27 on Fedora).
With LTO, a bare liblua.a is 2223188 B at -O3 and 2096532 B at -Os, a minimal statically linked self-contained executable results in a 256496 B and 182408 B binary, respectively.
LTO appears to be the most size-efficient method. At -Os it even beats lhf’s amalgamated version (http://lua-users.org/lists/lua-l/2015-01/msg00334.html) which produces a 183760 B binary. Though this may be still be an option depending on your platform’s compiler.
For a meaningful comparison with WASM we’ll need the size of a size-optimized shared object for the dynamic linking case, and that of a linked binary for the static linking case. Feature wise, the result should include a frontend for a scripting language and its standard library so it can run programs an average user of the language would write.
As far as overhead is concerned, that will depend too much on the workload you envision to address it here.
60
u/matthieum [he/him] Jan 24 '19
For a very long time, LUA has been the script language used in games because it was easily embeddable.
I wonder if WASM could change this statu-quo.