@antonz/lua-wasi
v5.4.6
Published
Lua WASI build.
Downloads
27
Readme
Lua WASI build
This 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
Usage
Using the Runno runtime:
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);
Building from source
make
make dist
License
Copyright 2024 Anton Zhiyanov, MIT License.
Lua is copyrighted by Lua.org, PUC-Rio, MIT License.