diff --git a/Justfile b/Justfile index 9758c635..e1b3fd8d 100644 --- a/Justfile +++ b/Justfile @@ -24,11 +24,11 @@ build_luajit: # `rustup target add i686-pc-windows-gnu` first build_ext: cd ewext && cargo build --release --target=i686-pc-windows-gnu - cp ewext/target/i686-pc-windows-gnu/release/ewext.dll quant.ew/ewext.dll + cp ewext/target/i686-pc-windows-gnu/release/ewext.dll quant.ew/ewext0.dll build_ext_debug: cd ewext && cargo build --target=i686-pc-windows-gnu - cp ewext/target/i686-pc-windows-gnu/debug/ewext.dll quant.ew/ewext.dll + cp ewext/target/i686-pc-windows-gnu/debug/ewext.dll quant.ew/ewext0.dll ## diff --git a/ewext/src/lib.rs b/ewext/src/lib.rs index c235c996..e49c5cba 100644 --- a/ewext/src/lib.rs +++ b/ewext/src/lib.rs @@ -65,7 +65,7 @@ unsafe extern "C" fn encode_area(lua: *mut lua_State) -> c_int { /// /// Only gets called by lua when loading a module. #[no_mangle] -pub unsafe extern "C" fn luaopen_ewext(lua: *mut lua_State) -> c_int { +pub unsafe extern "C" fn luaopen_ewext0(lua: *mut lua_State) -> c_int { println!("Initializing ewext"); unsafe { LUA.lua_createtable(lua, 0, 0); diff --git a/quant.ew/ewext0.dll b/quant.ew/ewext0.dll new file mode 100755 index 00000000..7fc885bc Binary files /dev/null and b/quant.ew/ewext0.dll differ diff --git a/quant.ew/init.lua b/quant.ew/init.lua index cc692fea..9068d508 100755 --- a/quant.ew/init.lua +++ b/quant.ew/init.lua @@ -14,7 +14,7 @@ np.EnableGameSimulatePausing(false) np.InstallDamageDetailsPatch() np.SilenceLogs("Warning - streaming didn\'t find any chunks it could stream away...\n") -ewext = require("ewext") +ewext = require("ewext0") -- Make some stuff global, as it's way too annoying to import each time. ctx = dofile_once("mods/quant.ew/files/core/ctx.lua")