Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
luau-rs
luau-rs is a Rust implementation of Luau, including the
parser, bytecode compiler, bytecode model, virtual machine, standard libraries,
configuration loading, and command-line tools.
[!CAUTION]
luau-rsis highly experimental. It is not ready for production use, compatibility is incomplete, and public APIs may change without notice. For production use, choose the official Luau implementation or, for Rust applications, mlua with itsluaufeature.
The initial release covers the parser, bytecode compiler, VM, standard libraries, command-line tools, and synchronous embedding API. Native code generation, type analysis, and async embedding remain in development.
Why This Exists
Unlike a binding that puts a Rust API around the C++ runtime, luau-rs ports
the implementation itself. Ownership, rooting, allocation, and unsafe
boundaries are therefore visible in one Rust codebase, where they can be tested,
fuzzed, and progressively tightened instead of ending at an FFI boundary.
Luau remains the source of truth for language and runtime behavior. The goal is not a new dialect or an independently evolving VM, but a source-faithful port with a safe embedding layer built on the same internal invariants.
Development Disclosure
All code in this repository was written by AI with human direction and review throughout. The project is developed through a deep, iterative human–AI loop in which scope, design constraints, source evidence, verification, and every accepted change are reviewed by a human.
Install
Rust 1.88 or newer is required.
Install the command-line tools from crates.io:
Command-Line Usage
Run a Luau script:
Compile source to bytecode:
Library Usage
Add the crate to a Rust project:
[]
= "0.732"
Compile and execute source through the safe embedding API:
let lua = new.expect;
let answer: i32 = lua
.load
.set_name
.call
.expect;
assert_eq!;
See the API documentation and runnable examples for the rest of the embedding API. Lower-level parser, compiler, bytecode, and VM crates are available separately for applications that need those boundaries directly.
Contributing
See CONTRIBUTING.md before opening an issue or pull request. Report vulnerabilities as described in SECURITY.md.
License
luau-rs is licensed under the
MIT License. The
Unicode-derived confusables data in luau-syntax is also distributed under the
Unicode data-file license.