Skip to main content

Module lua_vm

Module lua_vm 

Source

Re-exports§

pub use crate::lua_vm::call_info::CallInfo;
pub use crate::lua_vm::debug_info::DebugInfo;
pub use crate::lua_vm::lua_error::LuaError;
pub use opcode::Instruction;
pub use opcode::OpCode;

Modules§

async_thread
Async support for lua-rs: bridge Lua coroutines to Rust Futures.
call_info
debug_info
lua_error
lua_limits
Centralized Lua VM limits and configuration constants.
opcode
table_builder
Fluent builder for constructing Lua tables from Rust.

Structs§

LuaAnyRef
A generic user-facing reference to any Lua value.
LuaFunctionRef
A user-facing reference to a Lua function (Lua closure, C function, or Rust closure).
LuaRefValue
A reference to a Lua value stored in the VM’s registry.
LuaState
Execution state for a Lua thread/coroutine This is separate from LuaVM (global_State) to support multiple execution contexts
LuaStringRef
A user-facing reference to a Lua string.
LuaTableRef
A user-facing reference to a Lua table.
LuaVM
Global VM state (equivalent to global_State in Lua C API) Manages global resources shared by all execution threads/coroutines
SafeOption

Enums§

TmKind
Tag Method types (TMS from ltm.h)

Constants§

LUA_HOOKCALL
LUA_HOOKCOUNT
LUA_HOOKLINE
LUA_HOOKRET
LUA_HOOKTAILCALL
LUA_MASKCALL
LUA_MASKCOUNT
LUA_MASKLINE
LUA_MASKRET
LUA_NOREF
LUA_REFNIL
Special reference constants (matching Lua’s C API)

Functions§

get_metamethod_event
get_metatable
Get metatable for any value type

Type Aliases§

CFunction
C Function type - Rust function callable from Lua Now takes LuaContext instead of LuaVM for better ergonomics
LuaResult
RefId
A reference ID in the registry. Similar to Lua’s luaL_ref return value.