Skip to content

Runtime module guide

Dani edited this page Dec 23, 2021 · 2 revisions

Runtime modules are written in Lua.

All the Lua standard libraries should be available to modules. Modules do not have persistent VM's. Once the module finishes execution, the VM is cleaned up, ready to be used by another module.

Examples:

print("hello, world!") -- this Prints "Hello, world!" to stdout
s = io.read() -- this gets input from stdin, and places it in a string called s

print("Hello, "..s) -- this prints "Hello, " and the line read previously.
-- This defines a function called "someCoolFunc"
function someCoolFunc()
    print("Cool")
end

someCoolFunc() -- Calls the function

More info about lua here: Lua 5.4 Manual

⚠️ WARNING: Only install runtime modules from sources you trust! They can be harmful if misused! ⚠️

Clone this wiki locally