Lua WASI build.
npm install @antonz/lua-wasiThis is a WASI build of the Lua 5.4 interpreter, compiled with wasienv.
It is published as an NPM package @antonz/lua-wasi:
```
https://unpkg.com/@antonz/lua-wasi/dist/index.js
https://unpkg.com/@antonz/lua-wasi/dist/lua.wasm
Using the Runno runtime:
`js
import lua from "https://unpkg.com/@antonz/lua-wasi/dist/index.js";
import { WASI } from "https://unpkg.com/@antonz/runno/dist/runno.mjs";
const wasm = lua.load();
const result = await WASI.start(wasm, {
args: ["lua", "-v"],
stdout: (out) => console.log(out),
stderr: (err) => console.error(err),
});
console.log("exit code =", result.exitCode);
`
```
make
make dist
Copyright 2024 Anton Zhiyanov, MIT License.
Lua is copyrighted by Lua.org, PUC-Rio, MIT License.