Skip to content
XopoIIIPublic

About

A standalone Luau runtime that runs Luau the way Roblox runs it.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

LuneBlox logo

LuneBlox

A standalone Luau runtime that runs Luau the way Roblox runs it.

CI License Release

Documentation · Releases · Changelog

LuneBlox is Lune with the Luau underneath changed, so that code tested or measured here behaves like the code players run.

luneblox run script.luau
luneblox setup              # typedefs for luau-lsp, aliased as @lune
luneblox build script.luau  # a standalone executable, carrying the same Luau and flags

Why LuneBlox

Lune 0.10.5 runs Luau 0.709. Roblox runs 0.740 (September 2026), and on top of the version it runs Luau with its own set of Luau's fast flags -- Luau ships new compiler and VM work behind flags that default to off, and Roblox turns them on remotely. A benchmark or a test run on Lune measures a VM no game runs.

LuneBlox closes both gaps:

Lune 0.10.5 LuneBlox 0.11.3
Luau 0.709 0.740, the version Roblox runs
Luau's fast flags Luau's defaults set as the live Roblox client sets them (crates/lune/src/rt/roblox_fflags.rs)
Luau's C++ built with -Os (the workspace's size profile reached it) -O3
_VERSION Lune 0.10.5+709 LuneBlox 0.11.3+740

Performance

Measured on an Apple M1, median of three runs, on one Luau networking library's generated modules: interpreted code -- what most Roblox clients run -- is 39 to 57% faster to encode and decode, and modules that Lune's Luau left interpreted even when natively compiled now compile. Native code is built with the flags the live Roblox client sets, so native timings here are what Roblox gets. Roblox set DebugCodegenOptSize, which skips a native optimisation, until client 0.744 turned it off; since 0.11.2 LuneBlox has it off too, and those modules' native fires and decodes run 13 to 38% faster.

LUNE_ROBLOX_FFLAGS=0 runs with Luau's own defaults instead, to measure what the flags change.

Where it comes from

LuneBlox is built from Lune and keeps its whole interface: the same @lune/* libraries, the same task scheduler, the same Roblox datatypes and place/model files. On top of Lune's globals, every script has Roblox's Enum, as a Roblox client has it. The documentation covers the command line, every library and what differs from Lune: https://xopoiii.github.io/LuneBlox/.

Install

With Rokit:

rokit add XopoIII/LuneBlox luneblox

The command is luneblox, so it installs beside an upstream lune rather than in its place. Its typedefs, cross-compilation cache and REPL history live in ~/.luneblox.

Contributing

When Roblox moves to a new Luau release:

  1. Bump mlua to the release that pins it, then re-copy vendor/luau0-src from the luau0-src crate that release asks for and re-apply every fix marked LuneBlox: that Luau has not taken. If no mlua release carries the new Luau yet, patch mlua-sys in Cargo.toml to the mlua commit that does.
  2. luneblox run scripts/generate_roblox_fflags.luau to regenerate the flag table from Roblox's published client settings, limited to the flags that Luau declares.
  3. cargo test --workspace.

License

LuneBlox is licensed under the Mozilla Public License 2.0, as Lune is. It is a modified version of Lune by Filip Tibell and Lune's contributors; the changes are listed in CHANGELOG.md.

About

A standalone Luau runtime that runs Luau the way Roblox runs it.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages