Expose _G global variable in Space Lua

This commit is contained in:
Zef Hemel
2026-01-21 14:32:41 +01:00
parent 16114292fb
commit a89ab96438
3 changed files with 7 additions and 9 deletions
+2
View File
@@ -359,6 +359,8 @@ const loadFunction = new LuaBuiltinFunction((sf, s) => luaLoad(s, sf));
export function luaBuildStandardEnv() {
const env = new LuaEnv();
// _G global
env.set("_G", env);
// Top-level builtins
env.set("print", printFunction);
env.set("assert", assertFunction);