MCPcopy Index your code
hub / github.com/AndroidPatch/Module-Template-Lua / luaopen_libhello

Function luaopen_libhello

my_lua_module/src/lib.rs:27–35  ·  view source on GitHub ↗
(L: *mut lua_State)

Source from the content-addressed store, hash-verified

25
26#[unsafe(no_mangle)]
27pub unsafe extern "C" fn luaopen_libhello(L: *mut lua_State) -> c_int {
28 lua_newtable(L);
29
30 lua_pushcfunction(L, rust_add);
31 lua_setfield(L, -2, b"add\0".as_ptr() as _);
32 lua_pushcfunction(L, say_hello);
33 lua_setfield(L, -2, b"say_hello\0".as_ptr() as _);
34 1
35}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected