Files
Halyde/halyde/kernel/modules/defenv.lua
T
WahPlus cbf25999f0 PRE-ALPHA 3.0.0 - Rewrote the kernel to use a more modular design, changed some terms, added process sandboxing for security.
COMING IN THE FULL RELEASE:
- A user system
- A functional IPC (Inter-Process Communication) system

THINGS CAN AND WILL CHANGE FROM NOW UNTIL THE FINAL RELEASE.
2025-08-17 16:38:08 +03:00

54 lines
804 B
Lua

local module = {}
module.dependencies = {"terminal"}
function module.check()
return true -- This module should always be loaded
end
function module.init()
local publicTable = {
"print",
"require",
"_VERSION",
"_OSVERSION",
"assert",
"error",
"getmetatable",
"ipairs",
"load",
"next",
"pairs",
"pcall",
"rawequal",
"rawget",
"rawlen",
"rawset",
"select",
"setmetatable",
"tonumber",
"tostring",
"type",
"xpcall",
"bit32",
"coroutine",
"debug",
"math",
"os",
"string",
"table",
"checkArg",
"utf8",
"convert"
}
for _, value in ipairs(publicTable) do
_G._PUBLIC[value] = table.copy(_G[value])
end
end
function module.exit()
_G._PUBLIC = nil
end
return module