Skip to main content

Crate lua_vm

Crate lua_vm 

Source
Expand description

Lua 5.4 virtual machine — runtime crate.

Modules map to the canonical C source files per ANALYSES/file_deps.txt. Phase A populated each module with a faithful transliteration; Phase B is reconciling cross-module references against the lua-types foundation.

Modules§

api
debug
Debug interface — ported from ldebug.c.
do_
Stack and call structure of Lua.
dump
Pre-compiled Lua chunk serializer.
func
Auxiliary functions to manipulate prototypes and closures.
object
Generic functions over Lua objects.
prelude
Glob-imported by every module so the Phase-B extension traits resolve without each module having to list them individually.
state
Global State — port of lstate.c (445 lines, 25 functions) + lstate.h (merged).
string
String table and interned-string operations — port of lstring.c + lstring.h.
table
Lua table — canonical implementation now lives in lua-types::table.
tagmethods
Tag methods (metamethods) — ported from ltm.c / ltm.h.
trace_impls
Phase-D Trace implementations for GC-rooted types defined in this crate. Types in lua-types (LuaValue, LuaString, UpVal) have their Trace impls in lua-types/src/trace_impls.rs because of Rust’s orphan rule.
undump
Load precompiled Lua chunks.
vm
Lua virtual machine — port of src/lvm.c (1899 lines, 32 functions).
zio
Buffered streams — Rust port of lzio.c + lzio.h.