Skip to main content

luaur_rt/
ffi_public.rs

1//! The public, mlua-style raw C API surface (re-exported at `luaur_rt::ffi`).
2//!
3//! Mirrors `mlua::ffi`. Only the commonly used subset of the luaur C API is
4//! surfaced here, for callers that need to drop down to the stack-machine level
5//! (e.g. inside [`Lua::exec_raw`](crate::Lua::exec_raw) or
6//! [`Lua::create_c_function`](crate::Lua::create_c_function)). The full luaur C
7//! API lives in the `luaur-vm` crate.
8//!
9//! Everything here is `unsafe` to use and offers no safety guarantees beyond the
10//! underlying VM — it is the same low-level interface the safe wrappers sit on
11//! top of. luaur is a pure-Rust VM, so these are plain Rust `fn`s, not a C ABI
12//! boundary (see [`lua_CFunction`], which is a Rust `unsafe fn`, not an
13//! `extern "C-unwind" fn`).
14
15pub use luaur_vm::type_aliases::lua_c_function::lua_CFunction;
16pub use luaur_vm::type_aliases::lua_state::lua_State;
17
18pub use luaur_vm::functions::lua_call::lua_call;
19pub use luaur_vm::functions::lua_error::lua_error;
20pub use luaur_vm::functions::lua_getfield::lua_getfield;
21pub use luaur_vm::functions::lua_pcall::lua_pcall;
22pub use luaur_vm::functions::lua_pushboolean::lua_pushboolean;
23pub use luaur_vm::functions::lua_pushinteger::lua_pushinteger;
24pub use luaur_vm::functions::lua_pushnumber::lua_pushnumber;
25pub use luaur_vm::functions::lua_setfield::lua_setfield;
26pub use luaur_vm::functions::lua_tointegerx::lua_tointegerx;
27pub use luaur_vm::functions::lua_tonumberx::lua_tonumberx;
28pub use luaur_vm::functions::lua_type::lua_type;
29
30pub use luaur_vm::macros::lua_getglobal::lua_getglobal;
31pub use luaur_vm::macros::lua_setglobal::lua_setglobal;