📈 GH Trending Explorer 🎲 Surprise me

← all repos

t3dotgg / lust-lang

git clone https://github.com/t3dotgg/lust-lang.git v0.2.0 · 5d ago

lust: a Rust-subset compiler with an incremental daemon (fast dev checks for ts-rust)

+1
stars, 24h · #17,066
+~44
stars, 7 days · #4,437
+51
stars, 30 days · #12,218
51
★ total · +44% this week
3
forks · 2 open issues

Star history (as recorded here)

2026-10-20 · 32 ★ 2026-10-23 · 51 ★
LanguageRust
LicenseMIT
Created2026-10-15 (7d ago)
Last pushtoday
Watchers0
OwnerUser

Links

README excerpt
# lust-lang
Lust is an experiment. It asks one question: how fast can `check` and `build` of real Rust code get if the compiler supports only a subset of Rust, keeps a warm daemon, and gives up LLVM in dev builds?
To test this, lust compiles a subset of Rust. Every program lust accepts must be valid Rust (rustc 1.99, edition 2024), and it must give the same output as the `rustc` build. When lust cannot match rustc, it rejects the program with an error code. That rule makes `rustc` a free test oracle, and it gives lust programs a release path: Cargo builds the release binary from the same source.
**Status: early, but it compiles one real project.** About 250k lines of Rust and C in `src/`, plus 44k lines of std and adapter source in `library/`. It has a real type checker, trait solver, and borrow checker, and it reads Cargo workspaces. It checks and builds ts-rust v0.7.0, a Rust port of the TypeScript compiler, with a small set of rewrites. In the 2026-10-17 census, `lust check` passes 18 of 18 targets and `lust build` builds 11 of 11 bins. The lust-built bins give the same stdout, stderr, exit code, and written files as the Cargo-built bins on 540 of 540 fixture runs, 7 of 7 integration test bins, and 12 of 12 tool runs. 683 of 683 unit tests built by lust give the same result. The ts-rust changes are in pingdotgg/ts-rust#93, which moves the ts-rust dev check loop to lust: 6 commits (74 files) on top of upstream v0.7.0, plus docs. Under Cargo, a normal run behaves the same; only a few error texts change. Lust dev builds turn off jemalloc, the embedded lib snapshots, and real backtraces. The rewrites include a JSON reader in place of serde in two codegen tools (no proc macros), callbacks in place of futures for ATA requests (no `async`), named fns in place of closures in statics, named types in place of nested `impl Trait` and of `dyn WorkGroup `, the condition text as the message of 16 long `assert!` calls, and one `write_all` per `write!` in 8 `io::Write` impls. It is not a general Rust replacement. Most crates from crates.io will not compile: lust has no `async`, no `unsafe` code, no proc macros other than the built-in derives, and only 18 adapter crates for dependencies. Normal Rust also hits gaps. This will fail:
 [code] 
Read DESIGN.md and docs/ARCH.md as plans, not as a description of the code. Some parts are older than the code. docs/PLAN.md has the current plan. This README describes only what is in the tree today.
## Numbers
All numbers come from boat sandboxes: KVM machines with 16 vCPUs of an AMD Ryzen 9 9950X and 32 GB, x86_64 Linux, `rustc 1.99.0`, one job per sandbox. Each number names its date. Expect run-to-run variance: the sandboxes share hosts, and the same test can move 2x on a loaded day. Read the test shape before you read the speedup. The shape is most of the result.
Short version: on ts-rust, a warm lust daemon checks a one-line edit inside a function body about **60x to 250x** faster than `cargo check` at the median (more