Crate lua

Source
Expand description

Rust bindings for Lua 5.3 and beyond documentation. Original Lua library documentation here.

Re-exports§

pub extern crate libc;
pub use ffi::lua_Number as Number;
pub use ffi::lua_Integer as Integer;
pub use ffi::lua_CFunction as Function;
pub use ffi::lua_Alloc as Allocator;
pub use ffi::lua_Hook as Hook;

Modules§

ffi
Low level bindings to Lua.

Macros§

lua_func
Wrap a fn(&mut State) -> u32 as an ffi-suitable Function. The argument must be a path, so that the specific fn is known at compile-time.

Structs§

HookMask
Hook point masks for lua_sethook.
Reference
Type of Lua references generated through reference and unreference.
State
An idiomatic, Rust wrapper around lua_State.

Enums§

Arithmetic
Arithmetic operations for lua_arith.
Comparison
Comparison operations for lua_compare.
GcOption
Options for the Lua garbage collector.
Library
Represents all built-in libraries
ThreadStatus
Status of a Lua state.
Type
Represents all possible Lua data types.

Constants§

MASKCALL
Called when the interpreter calls a function.
MASKCOUNT
Called after the interpreter executes every count instructions.
MASKLINE
Called when the interpreter is about to start the execution of a new line of code.
MASKRET
Called when the interpreter returns from a function.
MULTRET
Specifies that all results from a call invocation should be pushed onto the stack.
NOREF
A value that will never be returned by reference.
REFNIL
The result of reference for nil values.
REGISTRYINDEX
Pseudo-index used to access the Lua registry.
RIDX_GLOBALS
The registry key for the global environment, to be used with raw_geti.
RIDX_MAINTHREAD
The registry key for the main thread, to be used with raw_geti.

Traits§

FromLua
Trait for types that can be taken from the Lua stack.
ToLua
Trait for types that can be pushed onto the stack of a Lua state.

Type Aliases§

Extra
Box for extra data.
Index
Integer type used to index the Lua stack, usually i32.