Skip to content

Architecture

your-game/src/**/*.ts
│
▼
┌─────────────────────────────┐
│ tsrs (vendored) │ Rust port of typescript-go: parser + binder
│ parse · bind · typecheck │ + checker, native, parallel (third_party/tsrs)
└──────────────┬──────────────┘
│ typed AST + TypeChecker queries
▼
┌─────────────────────────────┐
│ sloptor transformer │ port of roblox-ts's TSTransformer
│ TS AST ──► Luau AST │ (crates/rotor_transformer)
└──────────────┬──────────────┘
▼
┌─────────────────────────────┐
│ Luau AST + renderer │ port of @roblox-ts/luau-ast
│ byte-exact Luau text │ (crates/rotor_luau)
└──────────────┬──────────────┘
▼
out/**/*.lua (+ RuntimeLib.lua, verbatim from roblox-ts)
  • third_party/tsrs: generated mirror of oxc-project/tsrs, a Rust port of microsoft/typescript-go. Re-vendor with mise run tsrs:mirror. Never edit by hand.
  • reference/: pinned roblox-ts v3.0.0 and luau-ast 2.0.0 sources, the porting reference and differential-test oracle.
  • crates/rotor_luau: the Luau syntax tree and renderer.
  • crates/rotor_support: the single source of truth for sloptor's release version (version.rs).
  • crates/rotor_cli: the command-line interface.

sloptor stands on two giants:

  • roblox-ts (MIT): the original compiler, whose emit semantics sloptor ports. Vendored reference sources in reference/ keep their MIT license.
  • typescript-go, under Apache-2.0, is Microsoft's native TypeScript compiler, which tsrs ports. The vendored mirror in third_party/tsrs keeps its license and NOTICE file. See third_party/tsrs/MIRROR.md for provenance.

sloptor itself is MIT licensed.