-- Rustia

Luau, embedded in Rust.

Embed Luau in Rust games and tools. Edit scripts without a rebuild and let players write mods.

Rustia grew out of a game by Slowchop Studios that needed to script character decisions and replay them on desktop and in a browser.

Rustia features

Hot reload
Edit Luau without a rebuild. Your app keeps running and can carry state across edits, like the flowers’ positions here. 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.
Pure Rust runtime
One interpreter on desktop and web. Rustia’s runtime crates forbid unsafe Rust and build without a C++ toolchain.
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

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

Luau runtimes + Rust scripting crates

Capabilities are based on the linked source, CI and demos checked 20 November 2026.

ProjectRuntimePlatformsHot ReloadReplay
RustiaRustLinuxmacOSWindowsiOSAndroidBrowser WasmKeeps chosen state✓ Tested
luaurRustLinuxmacOSWindowsBrowser WasmHost-managed stateUnverified
uluaRustLinuxmacOSWindowsBrowser WasmHost-managed stateUnverified
ruauRustLinuxFresh module◐ Controls
luau-rs/luauRustLinuxBrowser WasmUnverifiedUnverified
mluaLuau C++LinuxmacOSWindowsBrowser WasmHost-managed stateUnverified
LuneLuau C++LinuxmacOSWindowsUnverifiedUnverified
Rustia
Project links
Runtime
Rust
Platforms
LinuxmacOSWindowsiOSAndroidBrowser Wasm
luaur
Project links
Runtime
Rust
Platforms
LinuxmacOSWindowsBrowser Wasm
Replay
Unverified
ulua
Project links
Runtime
Rust
Platforms
LinuxmacOSWindowsBrowser Wasm
Replay
Unverified
ruau
Project links
Runtime
Rust
Platforms
Linux
Hot Reload
Fresh module
luau-rs/luau
Project links
Runtime
Rust
Platforms
LinuxBrowser Wasm
Hot Reload
Unverified
Replay
Unverified
mlua
Project links
Runtime
Luau C++
Platforms
LinuxmacOSWindowsBrowser Wasm
Replay
Unverified
Lune
Project links
Runtime
Luau C++
Platforms
LinuxmacOSWindows
Hot Reload
Unverified
Replay
Unverified
What we checked
Runtime
The implementation that executes Luau. Luau C++ refers to the upstream Luau runtime.
Platforms
Platform evidence comes from CI, release builds or recorded runs. The globe links to a browser demo, test or build. A build confirms compilation. Rustia’s ARM64 mobile checks ran on a physical iPad and an Android 15 emulator.
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

Correctness comes first. We test Luau behaviour and deterministic replay while working to make Rustia faster.

Lower is better. 1× is Rustia’s time for that task. Each chart has its own scale.

Build, sum and sort an array

  • luaur0.36×
  • mlua + Luau0.37×
  • mlua + Luau JIT0.37×
  • Rustia1×
  • ruau1.41×
  • Koto5.08×
  • Rhai6.06×
  • RotoHandwritten quadratic sort. Exact timing

Sparse table reads and writes

  • mlua + Luau JIT0.21×
  • luaur0.23×
  • mlua + Luau0.26×
  • Rustia1×
  • ruau1.02×
  • Koto1.67×
  • Roto1.69×
  • Rhai3.98×

Call a closure

  • Roto0.05×
  • mlua + Luau JIT0.11×
  • mlua + Luau0.26×
  • luaur0.27×
  • Rustia1×
  • ruau1.56×
  • Koto1.76×
  • Rhai7.51×

Iterate over tables

  • luaur0.23×
  • Roto0.23×
  • mlua + Luau JIT0.24×
  • mlua + Luau0.30×
  • Koto0.53×
  • Rhai0.68×
  • Rustia1×
  • ruau1.21×

Math and table appends

  • luaur0.14×
  • mlua + Luau JIT0.17×
  • mlua + Luau0.17×
  • Roto0.20×
  • ruau0.93×
  • Rustia1×
  • Koto1.08×
  • Rhai2.23×

Snapshot from 2026-10-22 UTC on Linux x86-64. These are best observed times after startup, including interpreter, JIT and native results. Each engine uses its own version of each task. Roto JIT-compiles scripts to machine code with Cranelift before running them. Its sparse lookup uses a list, and its state update uses a regular function.

Exact benchmark timings on GitHub · Benchmark methodology and limitations