Skip to content

Commit ce4fc80

Browse files
committed
Bump luau-src to 0.17.0 (Luau 0.701)
1 parent 121971f commit ce4fc80

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

mlua-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cfg-if = "1.0"
4141
pkg-config = "0.3.17"
4242
lua-src = { version = ">= 548.1.0, < 548.2.0", optional = true }
4343
luajit-src = { version = ">= 210.6.0, < 210.7.0", optional = true }
44-
luau0-src = { version = "0.16.0", optional = true }
44+
luau0-src = { version = "0.17.0", optional = true }
4545

4646
[lints.rust]
4747
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(raw_dylib)'] }

mlua-sys/src/luau/luarequire.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ pub struct luarequire_Configuration {
5858
path: *const c_char,
5959
) -> luarequire_NavigateResult,
6060

61+
// Provides a final override opportunity if an alias cannot be found in configuration files. If
62+
// NAVIGATE_SUCCESS is returned, this must update the internal state to point at the aliased module.
63+
// Can be left undefined.
64+
pub to_alias_fallback: Option<
65+
unsafe extern "C-unwind" fn(
66+
L: *mut lua_State,
67+
ctx: *mut c_void,
68+
alias_unprefixed: *const c_char,
69+
) -> luarequire_NavigateResult,
70+
>,
71+
6172
// Navigates through the context by making mutations to the internal state.
6273
pub to_parent:
6374
unsafe extern "C-unwind" fn(L: *mut lua_State, ctx: *mut c_void) -> luarequire_NavigateResult,

src/luau/require.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ pub(super) unsafe extern "C-unwind" fn init_config(config: *mut ffi::luarequire_
299299
(*config).is_require_allowed = is_require_allowed;
300300
(*config).reset = reset;
301301
(*config).jump_to_alias = jump_to_alias;
302+
(*config).to_alias_fallback = None;
302303
(*config).to_parent = to_parent;
303304
(*config).to_child = to_child;
304305
(*config).is_module_present = is_module_present;

0 commit comments

Comments
 (0)