From 8e6d652a21255d24ea32d5d751e164ee2bc16715 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Tue, 20 Jan 2026 13:05:00 +0000 Subject: [PATCH] Bump luau-src to 0.18.0 (Luau 0.705) --- mlua-sys/Cargo.toml | 2 +- mlua-sys/src/luau/lauxlib.rs | 3 +++ mlua-sys/src/luau/luarequire.rs | 12 ++++++++++++ src/luau/require.rs | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mlua-sys/Cargo.toml b/mlua-sys/Cargo.toml index 99fce40..4240a40 100644 --- a/mlua-sys/Cargo.toml +++ b/mlua-sys/Cargo.toml @@ -43,7 +43,7 @@ cfg-if = "1.0" pkg-config = "0.3.17" lua-src = { version = ">= 550.0.0, < 550.1.0", optional = true } luajit-src = { version = ">= 210.6.0, < 210.7.0", optional = true } -luau0-src = { version = "0.17.0", optional = true } +luau0-src = { version = "0.18.0", optional = true } [lints.rust] unexpected_cfgs = { level = "allow", check-cfg = ['cfg(raw_dylib)'] } diff --git a/mlua-sys/src/luau/lauxlib.rs b/mlua-sys/src/luau/lauxlib.rs index 6e3587d..0c3b037 100644 --- a/mlua-sys/src/luau/lauxlib.rs +++ b/mlua-sys/src/luau/lauxlib.rs @@ -85,6 +85,9 @@ unsafe extern "C-unwind" { pub fn luaL_callyieldable(L: *mut lua_State, nargs: c_int, nresults: c_int) -> c_int; + #[link_name = "luaL_traceback"] + pub fn luaL_traceback_(L: *mut lua_State, L1: *mut lua_State, msg: *const c_char, level: c_int); + // sandbox libraries and globals #[link_name = "luaL_sandbox"] pub fn luaL_sandbox_(L: *mut lua_State); diff --git a/mlua-sys/src/luau/luarequire.rs b/mlua-sys/src/luau/luarequire.rs index 809acc2..0574efd 100644 --- a/mlua-sys/src/luau/luarequire.rs +++ b/mlua-sys/src/luau/luarequire.rs @@ -58,6 +58,18 @@ pub struct luarequire_Configuration { path: *const c_char, ) -> luarequire_NavigateResult, + // Provides an initial alias override opportunity prior to searching for configuration files. + // If NAVIGATE_SUCCESS is returned, the internal state must be updated to point at the + // aliased location. + // Can be left undefined. + pub to_alias_override: Option< + unsafe extern "C-unwind" fn( + L: *mut lua_State, + ctx: *mut c_void, + alias_unprefixed: *const c_char, + ) -> luarequire_NavigateResult, + >, + // Provides a final override opportunity if an alias cannot be found in configuration files. If // NAVIGATE_SUCCESS is returned, this must update the internal state to point at the aliased module. // Can be left undefined. diff --git a/src/luau/require.rs b/src/luau/require.rs index 13e968b..27dd8b4 100644 --- a/src/luau/require.rs +++ b/src/luau/require.rs @@ -299,6 +299,7 @@ pub(super) unsafe extern "C-unwind" fn init_config(config: *mut ffi::luarequire_ (*config).is_require_allowed = is_require_allowed; (*config).reset = reset; (*config).jump_to_alias = jump_to_alias; + (*config).to_alias_override = None; (*config).to_alias_fallback = None; (*config).to_parent = to_parent; (*config).to_child = to_child;