Commit Graph
2 Commits
Author SHA1 Message Date
waozi 8033702823 Borrow VM strings through std so wasm32 sees their length
The VM built string views from a hand-written { *u8, u64 } descriptor,
which on wasm32 (size_t lengths) read every string as empty. Views now go
through std's BytesFromPointer, which uses the target's slice layout.

The object records and LuaSyntaxNode are private again, now that the
toolchain (locked to 88b505bf) handles Vecs of module-private records.
`make wasm` builds the VM for the web platform with Emscripten and runs
it in a private headless Chromium as part of `make test`.
2026-11-07 02:48:50 -03:00
waozi e3223e466d Add a Lua 5.1 virtual machine written in Ziran
Lexer, parser and register compiler for the LuaJIT dialect of Lua 5.1
(goto, hex and \z escapes), an interpreter with tail calls, varargs,
coroutines and metatables, a mark-and-sweep collector with weak tables and
__gc, the base, coroutine, string, table, math, bit, debug and sandboxed
os/io libraries, and an embedding API modeled on the C API.
2026-11-07 01:37:42 -03:00