You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Moved lua stdlib from the rust autorun-env package to be a standalone
plugin.
- To do this reliably, added plugin "ordering" field which can allow a
plugin to specify the ordering it desires, lower number means higher
priority / starts first. Higher number starts later. Plugins are
sorted by this before being run.
- Added Autorun.load() which is the equivalent of lua's loadstring() or
gmod's CompileString, except it is also available on the menu.
- Implement FromLua for Option<FromLua>
- Simplify loadbuffer and pcall internals
Copy file name to clipboardExpand all lines: packages/autorun-env/api.json
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -277,6 +277,28 @@
277
277
"description": "The original function that was detoured"
278
278
}
279
279
]
280
+
},
281
+
{
282
+
"name": "load",
283
+
"description": "Compiles a Lua string into a callable function without executing it. Similar to Lua's loadstring/load function. Use this to dynamically compile code at runtime. NOTE: The environment inside defaults to the global environment, NOT Autorun's environment.",
284
+
"realm": "shared",
285
+
"parameters": [
286
+
{
287
+
"name": "code",
288
+
"type": "string",
289
+
"description": "The Lua code to compile"
290
+
}
291
+
],
292
+
"returns": [
293
+
{
294
+
"type": "function?",
295
+
"description": "The compiled function, or nil if compilation failed"
296
+
},
297
+
{
298
+
"type": "string?",
299
+
"description": "Error message if compilation failed"
0 commit comments