luau-analyze 0.0.1

In-process Luau type checker for Rust
Documentation
  • Coverage
  • 100%
    58 out of 58 items documented1 out of 27 items with examples
  • Size
  • Source code size: 4.94 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 982.78 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 25s Average build duration of successful builds.
  • all releases: 1m 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • cortesi/luau-analyze
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • cortesi

luau-analyze

Discord Crates.io Documentation License: MIT

In-process Luau type checking for Rust. Wraps the Luau Analysis frontend via a C shim so you can load host definitions, check Luau source, and get structured diagnostics without spawning an external process.

Usage

use luau_analyze::Checker;

let mut checker = Checker::new().expect("checker");

checker.add_definitions(r#"
    declare function greet(name: string): string
"#).expect("definitions");

let result = checker.check(r#"
    --!strict
    local msg: string = greet("world")
"#).expect("check");

assert!(result.is_ok());

Checkers are reusable — load definitions once, then check many sources. Each check returns diagnostics with location, severity, and message.

Building

Requires a C++17 toolchain (clang or gcc). From a git checkout, initialize the Luau submodule first:

git submodule update --init --recursive

The crates.io package bundles the Luau sources, so no submodule step is needed when using the published crate.

Supported platforms: macOS and Linux.

Design

  • Strict mode only, new solver only
  • Single-file checks (no cross-file require resolution)
  • Per-check timeout and cancellation via CancellationToken
  • No batch/queue workflows

Luau

Submodule pinned to tag 0.710 at crates/luau-analyze/luau.

Luau is licensed under the MIT License. Lua 5.1 code within Luau is also MIT licensed. See crates/luau-analyze/luau/LICENSE.txt and crates/luau-analyze/luau/lua_LICENSE.txt.