mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 07:14:50 +01:00
feat(lua): allow loading with many more names
codemp, libcodemp, codemp_native, codemp_lua all work now
This commit is contained in:
parent
0bca8ced41
commit
65721f3e6a
1 changed files with 6 additions and 2 deletions
|
@ -525,8 +525,12 @@ fn logger(_: &Lua, (printer, debug): (LuaValue, Option<bool>)) -> LuaResult<bool
|
|||
|
||||
|
||||
// define module and exports
|
||||
#[mlua::lua_module]
|
||||
fn codemp_native(lua: &Lua) -> LuaResult<LuaTable> {
|
||||
#[mlua::lua_module(name = "codemp")] fn entry_1(lua: &Lua) -> LuaResult<LuaTable> { entrypoint(lua) }
|
||||
#[mlua::lua_module(name = "libcodemp")] fn entry_2(lua: &Lua) -> LuaResult<LuaTable> { entrypoint(lua) }
|
||||
#[mlua::lua_module(name = "codemp_native")] fn entry_3(lua: &Lua) -> LuaResult<LuaTable> { entrypoint(lua) }
|
||||
#[mlua::lua_module(name = "codemp_lua")] fn entry_4(lua: &Lua) -> LuaResult<LuaTable> { entrypoint(lua) }
|
||||
|
||||
fn entrypoint(lua: &Lua) -> LuaResult<LuaTable> {
|
||||
let exports = lua.create_table()?;
|
||||
|
||||
// entrypoint
|
||||
|
|
Loading…
Reference in a new issue