pub enum DynamicSymbol {
RustNative(fn(&mut LuaState) -> Result<usize, LuaError>),
LuaCAbi(*const ()),
Unsupported {
reason: Vec<u8>,
},
}Expand description
Resolved dynamic-library symbol.
Only RustNative is callable by this build of the VM. LuaCAbi resolves
to a real C function pointer compiled against stock Lua 5.4’s lua_State *
ABI but cannot be safely invoked here — it is reported as an "init"
failure with a clear message. Unsupported carries an embedder-provided
reason byte-string.
Variants§
RustNative(fn(&mut LuaState) -> Result<usize, LuaError>)
Function pointer that follows this build’s Rust-native module ABI:
fn(&mut LuaState) -> Result<usize, LuaError>.
LuaCAbi(*const ())
Symbol exported against stock Lua 5.4’s C ABI. The function pointer is
resolved but never called from this build, since lua_State * is not
our LuaState. Kept as a payload so a future C-ABI facade can pick it
up; the embedder is responsible for ensuring the underlying library
outlives this value.
Unsupported
Embedder-provided refusal reason, e.g. “symbol resolved but ABI version
mismatch”. Reported verbatim as an "init" failure.