From a45fe9bb936909adf5e2a25b2bef80640de835cb Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Sat, 28 Feb 2026 12:03:37 +0000 Subject: [PATCH] Bump luau-src to 0.19 (Luau 0.710) --- mlua-sys/Cargo.toml | 2 +- mlua-sys/src/luau/lua.rs | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mlua-sys/Cargo.toml b/mlua-sys/Cargo.toml index 2230af7..c680489 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.18.0", optional = true } +luau0-src = { version = "0.19.0", optional = true } [lints.rust] unexpected_cfgs = { level = "allow", check-cfg = ['cfg(raw_dylib)'] } diff --git a/mlua-sys/src/luau/lua.rs b/mlua-sys/src/luau/lua.rs index 98ee5bc..1586233 100644 --- a/mlua-sys/src/luau/lua.rs +++ b/mlua-sys/src/luau/lua.rs @@ -501,6 +501,12 @@ pub type lua_Coverage = unsafe extern "C-unwind" fn( size: usize, ); +pub type lua_CounterFunction = + unsafe extern "C-unwind" fn(context: *mut c_void, function: *const c_char, linedefined: c_int); + +pub type lua_CounterValue = + unsafe extern "C-unwind" fn(context: *mut c_void, kind: c_int, line: c_int, hits: u64); + unsafe extern "C-unwind" { pub fn lua_stackdepth(L: *mut lua_State) -> c_int; pub fn lua_getinfo(L: *mut lua_State, level: c_int, what: *const c_char, ar: *mut lua_Debug) -> c_int; @@ -515,6 +521,14 @@ unsafe extern "C-unwind" { pub fn lua_getcoverage(L: *mut lua_State, funcindex: c_int, context: *mut c_void, callback: lua_Coverage); + pub fn lua_getcounters( + L: *mut lua_State, + funcindex: c_int, + context: *mut c_void, + functionvisit: lua_CounterFunction, + countervisit: lua_CounterValue, + ); + pub fn lua_debugtrace(L: *mut lua_State) -> *const c_char; } @@ -552,7 +566,7 @@ pub struct lua_Callbacks { /// gets called when L is created (LP == parent) or destroyed (LP == NULL) pub userthread: Option, /// gets called when a string is created; returned atom can be retrieved via tostringatom - pub useratom: Option i16>, + pub useratom: Option i16>, /// gets called when BREAK instruction is encountered pub debugbreak: Option,