File tree 3 files changed +28
-3
lines changed
3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ cfg-if = "1.0"
40
40
pkg-config = " 0.3.17"
41
41
lua-src = { version = " >= 547.0.0, < 547.1.0" , optional = true }
42
42
luajit-src = { version = " >= 210.5.0, < 210.6.0" , optional = true }
43
- luau0-src = { git = " https://github.com/mlua-rs/luau-src-rs" , rev = " 37e1e34 " , optional = true }
43
+ luau0-src = { git = " https://github.com/mlua-rs/luau-src-rs" , rev = " dc1102e " , optional = true }
44
44
45
45
[lints .rust ]
46
46
unexpected_cfgs = { level = " allow" , check-cfg = [' cfg(raw_dylib)' ] }
Original file line number Diff line number Diff line change @@ -71,10 +71,17 @@ extern "C-unwind" {
71
71
72
72
pub fn luaL_newstate ( ) -> * mut lua_State ;
73
73
74
- // TODO: luaL_findtable
74
+ pub fn luaL_findtable (
75
+ L : * mut lua_State ,
76
+ idx : c_int ,
77
+ fname : * const c_char ,
78
+ szhint : c_int ,
79
+ ) -> * const c_char ;
75
80
76
81
pub fn luaL_typename ( L : * mut lua_State , idx : c_int ) -> * const c_char ;
77
82
83
+ pub fn luaL_callyieldable ( L : * mut lua_State , nargs : c_int , nresults : c_int ) -> c_int ;
84
+
78
85
// sandbox libraries and globals
79
86
#[ link_name = "luaL_sandbox" ]
80
87
pub fn luaL_sandbox_ ( L : * mut lua_State ) ;
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ pub struct luarequire_Configuration {
104
104
pub load : unsafe extern "C-unwind" fn (
105
105
L : * mut lua_State ,
106
106
ctx : * mut c_void ,
107
+ path : * const c_char ,
107
108
chunkname : * const c_char ,
108
109
contents : * const c_char ,
109
110
) -> c_int ,
@@ -114,12 +115,29 @@ pub type luarequire_Configuration_init = unsafe extern "C" fn(config: *mut luare
114
115
115
116
extern "C-unwind" {
116
117
// Initializes and pushes the require closure onto the stack without registration.
117
- pub fn lua_pushrequire (
118
+ pub fn luarequire_pushrequire (
118
119
L : * mut lua_State ,
119
120
config_init : luarequire_Configuration_init ,
120
121
ctx : * mut c_void ,
121
122
) -> c_int ;
122
123
123
124
// Initializes the require library and registers it globally.
124
125
pub fn luaopen_require ( L : * mut lua_State , config_init : luarequire_Configuration_init , ctx : * mut c_void ) ;
126
+
127
+ // Initializes and pushes a "proxyrequire" closure onto the stack.
128
+ //
129
+ // The closure takes two parameters: the string path to resolve and the chunkname of an existing
130
+ // module.
131
+ pub fn luarequire_pushproxyrequire (
132
+ L : * mut lua_State ,
133
+ config_init : luarequire_Configuration_init ,
134
+ ctx : * mut c_void ,
135
+ ) -> c_int ;
136
+
137
+ // Registers an aliased require path to a result.
138
+ //
139
+ // After registration, the given result will always be immediately returned when the given path is
140
+ // required.
141
+ // Expects the path and table to be passed as arguments on the stack.
142
+ pub fn luarequire_registermodule ( L : * mut lua_State ) -> c_int ;
125
143
}
You can’t perform that action at this time.
0 commit comments