webassembly lua runtime
current version: 5.4
- out/lua.js - the javascript runtime
- out/lua.wasm - the webassembly binary
get the lua source code here
compile with emscripten using the following command line arguments:
-s ALLOW_TABLE_GROWTH=1 --post-js lua-api.js --pre-js pre.js
put var Lua = {};
on the top of the generated javascript file. it does not come with that already defined, so you can encapsulate the emscripten variables via a function that runs immediately.