• Sources: primary, discussion
  • Summary: Relax is a 438k-line Rust library with its own front end, type and borrow checker, optimizer, and x86-64 and AArch64 back ends. It compiles functions lazily and tiers hot ones from an interpreter through O1 to O3. On an M4 MacBook, a large 3D game reached its first frame in 11 s from a clean checkout, against about 3 minutes with cargo. Code runs 1.12x the time of stock release builds on x64 and 1.24x on arm64, measured as a geomean over 21 workloads. Layout, trait and macro changes still need a restart, and Windows is untested.
  • Why it matters: It offers a far shorter edit and run loop for large Rust codebases and agent workflows, while release builds stay on rustc.
  • Background: A JIT compiles code while the program runs instead of ahead of time, which is how the JVM and V8 work. Rust has always relied on ahead-of-time compilation through LLVM, where long build and link times dominate iteration on large projects. Relax keys every cached result by input hashes, so it needs no cargo clean.
  • Comments: The Hacker News thread drew 151 points and 69 comments.