Rustia

Luau, embedded in Rust.

Rustia is a pure-Rust interpreter for embedding standalone Luau in games and tools. Edit scripts without a rebuild and let players write mods.

Why Rustia exists

We built Rustia at Slowchop Studios for a Bevy game. We wanted to tweak gameplay without waiting for Rust to recompile, run scripts quickly and safely, and get deterministic results for multiplayer and replays on desktop and in the browser.

Rustia features

Hot reload
Edit Luau without a rebuild. Your app keeps running and can carry state across edits, like the flowers’ positions in the garden. If a reload fails, Rustia can restore the previous script state.
Deterministic execution
Replay a run. In deterministic mode, the same script, starting state, seed, and ordered inputs produce matching results on native and WebAssembly. That helps reproduce bugs and keep lockstep multiplayer clients in sync.
Parallel script execution
Run independent Luau VMs on Rust worker threads. Each VM has its own script state, and your app schedules the work.
Pure Rust runtime
One interpreter on desktop and web. Rustia’s runtime crates forbid unsafe Rust and build without a C++ toolchain.
Sans-I/O core
Embed Luau without relying on built-in platform services. Your app can supply clocks and randomness, decide where print output goes, and choose how to load scripts.
Rust functions and objects
Let scripts work with your app. Expose the functions and objects they need, and use Serde to read Luau tables into Rust structs.
Script execution limits
Keep runaway scripts under control. Set instruction and VM memory budgets so your app can handle a script that exceeds them.

In development

Time-travel debugging
Step back through a recorded Luau run, inspect earlier values, and find the line that last changed a variable. Follow the debugger work.
A Luau layer for Bevy
We’re building a Luau layer on top of Bevy so you can change gameplay while the game runs, without rebuilding the Rust app.
JIT and AOT research
We’re exploring just-in-time (JIT) compilation in the background during development and ahead-of-time (AOT) compilation for bundled scripts. Today Rustia interprets Luau bytecode. Follow the compilation work.
Synth in Luau
We’re also having fun with a Luau synth in the browser. Write and tweak sounds live, record MIDI performances, and record audio from instruments.

How Rustia compares

Are we script yet?

Compare Luau runtimes by platform and workflow, and see how Rustia performed alongside other scripting options for Rust.

Luau runtimes and other scripting projects

✓ Ran in Rustia checks · B Build or type-check only · U Upstream evidence. Sources checked 28 November 2026.

ProjectRunsWritten inPlatformsHot ReloadReplay
RustiaLuauRustKeeps chosen state✓ Tested
luaurLuauRustHost-managed stateUnverified
uluaLuauRustHost-managed stateUnverified
ruauLuauRustFresh module◐ Controls
luau-rs/luauLuauRustUnverifiedUnverified
mluaLua, LuauC (Lua), C++ (Luau)Host-managed stateUnverified
LuneLuauC++ (via mlua)UnverifiedUnverified
KotoKotoRustUnverifiedUnverified
RhaiRhaiRustUnverifiedUnverified
RotoRotoRustUnverifiedUnverified
PiccoloLuaRustUnverifiedUnverified
RuneRuneRustUnverifiedUnverified
StarlarkStarlarkRustUnverifiedUnverified
BoaJavaScriptRustUnverifiedUnverified
rquickjsJavaScriptQuickJS (C)UnverifiedUnverified
WasmiWebAssemblyRustUnverifiedUnverified
WasmtimeWebAssemblyRustUnverifiedUnverified
RustScriptRustScriptRustUnverifiedUnverified
SteelSchemeRustUnverifiedUnverified
DyonDyonRustUnverifiedUnverified
DuckscriptDuckscriptRustUnverifiedUnverified
GluonGluonRustUnverifiedUnverified
RustPythonPythonRustUnverifiedUnverified
LunaLuaRustUnverifiedUnverified
MunMunRustUnverifiedUnverified
Rustia
Project links
Runs
Luau
Written in
Rust
Platforms
luaur
Project links
Runs
Luau
Written in
Rust
Platforms
Replay
Unverified
ulua
Project links
Runs
Luau
Written in
Rust
Platforms
Replay
Unverified
ruau
Project links
Runs
Luau
Written in
Rust
Platforms
Hot Reload
Fresh module
luau-rs/luau
Project links
Runs
Luau
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
mlua
Project links
Runs
Lua, Luau
Written in
C (Lua), C++ (Luau)
Platforms
Replay
Unverified
Lune
Project links
Runs
Luau
Written in
C++ (via mlua)
Platforms
Hot Reload
Unverified
Replay
Unverified
Koto
Project links
Runs
Koto
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Rhai
Project links
Runs
Rhai
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Roto
Project links
Runs
Roto
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Piccolo
Project links
Runs
Lua
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Rune
Project links
Runs
Rune
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Starlark
Project links
Runs
Starlark
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Boa
Project links
Runs
JavaScript
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
rquickjs
Project links
Runs
JavaScript
Written in
QuickJS (C)
Platforms
Hot Reload
Unverified
Replay
Unverified
Wasmi
Project links
Runs
WebAssembly
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Wasmtime
Project links
Runs
WebAssembly
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
RustScript
Project links
Runs
RustScript
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Steel
Project links
Runs
Scheme
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Dyon
Project links
Runs
Dyon
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Duckscript
Project links
Runs
Duckscript
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Gluon
Project links
Runs
Gluon
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
RustPython
Project links
Runs
Python
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Luna
Project links
Runs
Lua
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
Mun
Project links
Runs
Mun
Written in
Rust
Platforms
Hot Reload
Unverified
Replay
Unverified
What we checked
Runs
The language or bytecode the engine executes.
Written in
The implementation language of the engine. Rust bindings can call an engine written in C or C++.
Platforms
Platform evidence comes from CI, release builds or recorded runs. Each badge links to the evidence for its platform. A build confirms compilation. Rustia’s ARM64 mobile checks ran on a physical iPad and an Android 15 emulator. Competitor mobile ✓ badges link to simulator and emulator results. U badges link to upstream evidence, including published binaries, tests, demos or compilation checks. A missing badge means the table has no evidence to show for that platform. The extended competitor coverage lists the versions tested and separates runtime checks, build checks and upstream evidence.
Hot Reload
The app keeps running in each documented reload path.
  • Keeps chosen state. The embedder can carry selected script state across edits, as the Rustia garden does.
  • Fresh module. The replacement starts with new module-local variables.
  • Host-managed state. The host supplies the replacement and decides what to carry forward.
  • Unverified. The sources showed how to run edited code without establishing a reload path.
Replay
Rustia’s recorded deterministic race matched on native and browser Wasm. ruau documents controls for seeds and the clock. Unverified means the reviewed sources did not establish replay support or provide a matching run.

Luau comparison sources and notes

Runtime speed

Lower is better. 1× is Rustia’s time for that task. Bars follow the selected measures in order. Each measure has its own scale. The array chart caps bars at 10× and marks higher times with an arrow.

Measures

Build, sum and sort an array

µs
  • Wasmtime
    Steady-state time0.0082×0.3836 µs per work unit
  • Wasmi
    Steady-state time0.06×2.745 µs per work unit
  • luaur
    Steady-state time0.39×18.34 µs per work unit
  • mlua + Luau JIT
    Steady-state time0.40×18.89 µs per work unit
  • mlua + Luau
    Steady-state time0.40×18.9 µs per work unit
  • ulua
    Steady-state time0.41×19.28 µs per work unit
  • luau-rs/luau
    Steady-state time0.44×20.81 µs per work unit
  • mlua + Lua 5.4
    Steady-state time0.98×46.01 µs per work unit
  • Rustia
    Steady-state time1×46.92 µs per work unit
  • Starlark
    Steady-state time1.46×68.45 µs per work unit
  • ruau
    Steady-state time1.55×72.7 µs per work unit
  • Rune
    Steady-state time2.06×96.75 µs per work unit
  • rquickjs
    Steady-state time2.31×108.5 µs per work unit
  • Koto
    Steady-state time5.77×270.6 µs per work unit
  • Rhai
    Steady-state time6.69×314 µs per work unit
  • Boa
    Steady-state time19.86×931.9 µs per work unit
  • Roto
    Steady-state time71.09×3,335 µs per work unit
  • PiccoloSkipped · Version 0.3.3 lacks table.sort.

Sparse table reads and writes

µs
  • Wasmtime
    Steady-state time0.0049×0.4355 µs per work unit
  • Wasmi
    Steady-state time0.03×2.366 µs per work unit
  • mlua + Luau JIT
    Steady-state time0.22×19.2 µs per work unit
  • luaur
    Steady-state time0.22×19.68 µs per work unit
  • luau-rs/luau
    Steady-state time0.25×21.63 µs per work unit
  • mlua + Luau
    Steady-state time0.26×22.85 µs per work unit
  • ulua
    Steady-state time0.27×23.55 µs per work unit
  • mlua + Lua 5.4
    Steady-state time0.31×27.63 µs per work unit
  • Starlark
    Steady-state time0.31×27.64 µs per work unit
  • Piccolo
    Steady-state time0.47×41.11 µs per work unit
  • Rustia
    Steady-state time1×88.07 µs per work unit
  • ruau
    Steady-state time1.00×88.33 µs per work unit
  • rquickjs
    Steady-state time1.14×100.1 µs per work unit
  • Koto
    Steady-state time1.65×145.2 µs per work unit
  • Roto
    Steady-state time1.68×147.7 µs per work unit
  • Rune
    Steady-state time1.73×152.4 µs per work unit
  • Rhai
    Steady-state time3.88×341.9 µs per work unit
  • Boa
    Steady-state time4.27×376.4 µs per work unit

Call a closure

µs
  • Roto
    Steady-state time0.05×0.0091 µs per work unit
  • mlua + Luau JIT
    Steady-state time0.13×0.02432 µs per work unit
  • Wasmtime
    Steady-state time0.16×0.03094 µs per work unit
  • mlua + Lua 5.4
    Steady-state time0.21×0.04107 µs per work unit
  • luau-rs/luau
    Steady-state time0.25×0.04877 µs per work unit
  • mlua + Luau
    Steady-state time0.26×0.05112 µs per work unit
  • ulua
    Steady-state time0.27×0.05227 µs per work unit
  • luaur
    Steady-state time0.28×0.05449 µs per work unit
  • Wasmi
    Steady-state time0.73×0.1414 µs per work unit
  • Starlark
    Steady-state time0.88×0.1709 µs per work unit
  • Rustia
    Steady-state time1×0.1944 µs per work unit
  • Piccolo
    Steady-state time1.04×0.2031 µs per work unit
  • ruau
    Steady-state time1.55×0.3023 µs per work unit
  • Koto
    Steady-state time1.78×0.3462 µs per work unit
  • Rune
    Steady-state time2.48×0.4823 µs per work unit
  • rquickjs
    Steady-state time2.54×0.4929 µs per work unit
  • Rhai
    Steady-state time7.59×1.476 µs per work unit
  • Boa
    Steady-state time13.90×2.702 µs per work unit

Iterate over tables

µs
  • Wasmtime
    Steady-state time0.0061×0.0974 µs per work unit
  • Wasmi
    Steady-state time0.02×0.3144 µs per work unit
  • Starlark
    Steady-state time0.07×1.195 µs per work unit
  • mlua + Lua 5.4
    Steady-state time0.19×3.051 µs per work unit
  • luaur
    Steady-state time0.19×3.095 µs per work unit
  • Roto
    Steady-state time0.20×3.251 µs per work unit
  • mlua + Luau JIT
    Steady-state time0.22×3.505 µs per work unit
  • mlua + Luau
    Steady-state time0.26×4.068 µs per work unit
  • luau-rs/luau
    Steady-state time0.26×4.091 µs per work unit
  • ulua
    Steady-state time0.29×4.627 µs per work unit
  • rquickjs
    Steady-state time0.35×5.554 µs per work unit
  • Koto
    Steady-state time0.47×7.532 µs per work unit
  • Rune
    Steady-state time0.56×8.921 µs per work unit
  • Rhai
    Steady-state time0.62×9.811 µs per work unit
  • Rustia
    Steady-state time1×15.94 µs per work unit
  • ruau
    Steady-state time1.08×17.27 µs per work unit
  • Boa
    Steady-state time2.19×34.95 µs per work unit
  • PiccoloSkipped · Version 0.3.3 lacks the __pairs path used here.

Math and table appends

µs
  • Wasmtime
    Steady-state time0.0019×0.006462 µs per work unit
  • Wasmi
    Steady-state time0.0078×0.02609 µs per work unit
  • luaur
    Steady-state time0.05×0.1812 µs per work unit
  • ulua
    Steady-state time0.07×0.2238 µs per work unit
  • mlua + Luau
    Steady-state time0.07×0.2246 µs per work unit
  • mlua + Luau JIT
    Steady-state time0.07×0.2246 µs per work unit
  • luau-rs/luau
    Steady-state time0.07×0.2305 µs per work unit
  • mlua + Lua 5.4
    Steady-state time0.08×0.2705 µs per work unit
  • Roto
    Steady-state time0.08×0.2855 µs per work unit
  • rquickjs
    Steady-state time0.18×0.5988 µs per work unit
  • ruau
    Steady-state time0.38×1.285 µs per work unit
  • Koto
    Steady-state time0.45×1.519 µs per work unit
  • Rhai
    Steady-state time0.94×3.181 µs per work unit
  • Rustia
    Steady-state time1×3.367 µs per work unit
  • Boa
    Steady-state time1.33×4.486 µs per work unit
  • PiccoloSkipped · Version 0.3.3 lacks table.sort.
  • RuneSkipped · Standard library lacks sin and cos.
  • StarlarkSkipped · Standard library lacks sin and cos.

Linux x86-64 · 2026-11-28 UTC · Median of 10 samples. Cold start includes preparation and the first call. Workload implementations vary by engine.

Benchmark data · Methodology and limitations