ZeroJS Runtime
README.md
ZeroJS
A JavaScript interpreter written in pure Luau for the Zero engine. Run JavaScript from Luau, or author JavaScript as first-class zJs engine assets.
- Language: ES2017-practical — closures, classes, destructuring, spread, generators-lite, template literals.
- Runtime: real event loop, Promises,
async/await,setTimeout/setInterval,queueMicrotask. - Stdlib: Object/Array/String/Number/Math/JSON/Map/Set + a from-scratch backtracking regex engine (RegExp, String.match/replace/split).
- Modules: ES
import/exportacrosszJsassets, evaluate-once module graph, cycle detection. zJsassetType: author a.zJsasset and call:run()/:runAsync()/:exports()/:check()on it.
Quick start
local zerojs = require("zerojs.init")
local vm = zerojs.new()
vm:set("greet", function(name) return "hi " .. name end)
print(vm:run("greet('world').toUpperCase()")) -- HI WORLD
Validated by 9 test suites (lexer, parser, semantics, stdlib, regex, async, modules, smoke, assettype).