LuauVM (lowercase u, /ˈlu.aʊ/) is a fast and small luau interpreter wrote in luau. It aims to provide sandboxing, arbitrary code execution and "obfuscation" templates.
This software can be used as study material for luau - lua 5.x internals.
- This VM won't be maintained constantly over luau updates.
- This VM doesn't aim to provide a fast bytecode execution.
- This VM has been tested with scripts like the ones in MakeTests/src folder.
local vm = require("./VM/main"); -- require("LuauVM");
local bytecode = [[BYTECODE]]
-- #1 way
local proto = vm.luau_load(bytecode);
local closure = vm.wrap_proto(proto);
closure();
-- #2 way
local closure = vm.loadstring(bytecode);
closure();
Note: only an interpreter is provided and compiled code must be obtained from a supported luau compiler
python MakeTests\main.py -t
to build tests scripts in Tests directory
- Tests' scripts must return 0 to pass the check.
python MakeTests\run.py - r
to run all built tests
luau "<path/to/test-script>"
to run a specific test script