mlua-sys: Update Luau to 0.671

This commit is contained in:
Alex Orlenko
2025-04-25 23:38:49 +01:00
parent 21fc924457
commit 9fda2ecfcc
3 changed files with 28 additions and 3 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ cfg-if = "1.0"
pkg-config = "0.3.17"
lua-src = { version = ">= 547.0.0, < 547.1.0", optional = true }
luajit-src = { version = ">= 210.5.0, < 210.6.0", optional = true }
luau0-src = { git = "https://github.com/mlua-rs/luau-src-rs", rev = "37e1e34", optional = true }
luau0-src = { git = "https://github.com/mlua-rs/luau-src-rs", rev = "dc1102e", optional = true }
[lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(raw_dylib)'] }
+8 -1
View File
@@ -71,10 +71,17 @@ extern "C-unwind" {
pub fn luaL_newstate() -> *mut lua_State;
// TODO: luaL_findtable
pub fn luaL_findtable(
L: *mut lua_State,
idx: c_int,
fname: *const c_char,
szhint: c_int,
) -> *const c_char;
pub fn luaL_typename(L: *mut lua_State, idx: c_int) -> *const c_char;
pub fn luaL_callyieldable(L: *mut lua_State, nargs: c_int, nresults: c_int) -> c_int;
// sandbox libraries and globals
#[link_name = "luaL_sandbox"]
pub fn luaL_sandbox_(L: *mut lua_State);
+19 -1
View File
@@ -104,6 +104,7 @@ pub struct luarequire_Configuration {
pub load: unsafe extern "C-unwind" fn(
L: *mut lua_State,
ctx: *mut c_void,
path: *const c_char,
chunkname: *const c_char,
contents: *const c_char,
) -> c_int,
@@ -114,7 +115,7 @@ pub type luarequire_Configuration_init = unsafe extern "C" fn(config: *mut luare
extern "C-unwind" {
// Initializes and pushes the require closure onto the stack without registration.
pub fn lua_pushrequire(
pub fn luarequire_pushrequire(
L: *mut lua_State,
config_init: luarequire_Configuration_init,
ctx: *mut c_void,
@@ -122,4 +123,21 @@ extern "C-unwind" {
// Initializes the require library and registers it globally.
pub fn luaopen_require(L: *mut lua_State, config_init: luarequire_Configuration_init, ctx: *mut c_void);
// Initializes and pushes a "proxyrequire" closure onto the stack.
//
// The closure takes two parameters: the string path to resolve and the chunkname of an existing
// module.
pub fn luarequire_pushproxyrequire(
L: *mut lua_State,
config_init: luarequire_Configuration_init,
ctx: *mut c_void,
) -> c_int;
// Registers an aliased require path to a result.
//
// After registration, the given result will always be immediately returned when the given path is
// required.
// Expects the path and table to be passed as arguments on the stack.
pub fn luarequire_registermodule(L: *mut lua_State) -> c_int;
}