Relax is a live Rust compiler and JIT runtime intended to replace the usual rustc, LLVM, linker, and parts of Cargo for development. It checks types and borrows before execution, then compiles functions when first called, starting with an interpreter and optimizing hot code in the background. Saving a file recompiles only affected functions and patches them into the running process, generally preserving its state; changes that cannot be patched trigger an in-place restart. The project says its standalone Rust implementation has 438,000 lines, no crates.io dependencies, and its own x86-64 and AArch64 code generators. On an M4 MacBook, a large game reportedly reaches its first frame in 11 seconds from a clean checkout, versus about three minutes to build with rustc; a small app takes 3.7 seconds cold and 0.41 seconds warm. After a save, 92 tests rerun in 2.2 seconds.
The central trade-off is faster development iteration for slower optimized execution. In measured workloads, Relax runs 1.14-1.26 times slower than rustc’s native-CPU release builds; a dense numeric kernel is 2.29 times slower, largely because Relax does not yet vectorize loops. The project acknowledges that a broader 18-workload test performed worse than its highlighted results and is being investigated. It also describes a development hub that keeps live sessions and warm caches for parallel AI-agent work: nine lanes reportedly handle more than 300 build and test jobs per hour. The code generation and tests currently work from fresh clones on Linux x86-64 and macOS arm64; Windows is untested.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.