Skip to main content

lua_vm/
lib.rs

1//! Lua 5.4 virtual machine — runtime crate.
2//!
3//! Modules map to the canonical C source files per `ANALYSES/file_deps.txt`.
4//! Phase A populated each module with a faithful transliteration; Phase B is
5//! reconciling cross-module references against the `lua-types` foundation.
6
7pub mod api;
8pub mod ctype;
9pub mod debug;
10pub mod do_;
11pub mod dump;
12pub mod func;
13pub mod object;
14pub mod state;
15pub mod string;
16pub mod table;
17pub mod trace_impls;
18pub mod tagmethods;
19pub mod undump;
20pub mod vm;
21pub mod zio;
22
23/// Glob-imported by every module so the Phase-B extension traits resolve
24/// without each module having to list them individually.
25///
26/// TODO(phase-b): once the canonical types in `lua-types` grow these methods
27/// natively, this prelude can shrink to just the LuaState helpers.
28pub mod prelude {
29    pub use crate::state::{
30        LuaValueExt, LuaTypeExt, StackIdxExt,
31        LuaTableRefExt, LuaUserDataRefExt, LuaStringRefExt,
32        LuaLClosureRefExt, LuaClosureExt, LuaProtoExt,
33    };
34    pub use crate::vm::{InstructionExt, OpCode};
35    pub(crate) use crate::tagmethods::TagMethod;
36}
37
38// ──────────────────────────────────────────────────────────────────────────
39// PORT STATUS
40//   source:        (module aggregator; see individual files for C sources)
41//   target_crate:  lua-vm
42//   confidence:    high
43//   todos:         0
44//   port_notes:    0
45//   unsafe_blocks: 0
46//   notes:         Each pub mod corresponds to one C source under
47//                  `reference/lua-5.4.7/src/`. See `ANALYSES/file_deps.txt`.
48// ──────────────────────────────────────────────────────────────────────────