Relax runs your Rust program while it compiles it, cutting a 3-minute build to 11 seconds

Relax: JIT compiler for Rust to reduce build times

Relax is a live compiler and JIT runtime for Rust, written in Rust with 438k lines and zero crates.io dependencies. It runs a Cargo package straight from source, with no rustc, LLVM, or linker, compiling each function on first call and patching edits into the running process. A large 3D game shows its first frame 11 seconds after a clean checkout on an M4 MacBook, versus roughly 3 minutes with rustc, and 92 tests re-run in 2.2 seconds after a save. Optimized code still trails rustc --release.

Rust gives you speed and safety, and charges for them in compile times. Relax keeps the speed and the safety and drops the charge.
  1. ben-schaaf

    I did a quick test on various of my rust projects. Most of them it failed to run, on one it miscompiles(?) causing a test case to fail. The only project I got it to run without issue is a basic actix-web website. It takes a whole 14 seconds to actually start the web server. A clean compile is only 24s for all dependencies, and a regular incremental debug build is 2.3s.

    The hot patching is unusable. It takes 11s to compile the patch after a simple change: (Some("hi") -> None), and then relax gets a compiler error when refreshing the page.

    The project where it miscompiles only has a few very basic dependencies; a clean compile takes 1.3s, incremental just 0.25s and tests take ~0.1s. Relax takes a whole 1.4s to run the tests (unsuccessfully).

  2. faresahmed

    Somehow always, someone somewhere rediscovers that cutting down the time between coding and code execution makes our lives easier and to a degree be able to write better programs.

    Perhaps the earliest and best attempt was Lisp's computational model. Since then, the idea manifested itself again[1], again[2], and again[3] in different forms.

    [1]: Inventing on Principle, Bret Victor: https://www.youtube.com/watch?v=PUv66718DII

    [2]: REPL-Driven Development, Stuart Halloway: https://vimeo.com/223309989

    [3]: LIVE, Live Programming workshop: https://liveprog.org/

  3. _cart

    Pretty wild to me that AI has enabled the commoditization of one of the gnarliest engineering problems. Over the course of just a month, we now have three "viable" AI-driven iteration-focused Rust compilers:

    - https://github.com/makepad/relax

    - https://github.com/DioxusLabs/rustd/

    - https://github.com/indexable-inc/blaze

  4. jkelleyrtp

    I built something similar - tbd on maintaining it - but I got Rust Analyzer emitting code and as well as running in the web. This new concept of rust compile daemon is pretty sick.

    Can build and iterate on Rust in the browser!

    https://dioxuslabs.github.io/rustd/

  5. cedws

    Rust is a nice language but it’s so heavy. Since our company switched from Go I’ve had to become used to my laptop being burning hot and stuttering whilst trying to do anything during compilation.

  6. Sytten

    We have had good experience with kache so far to speedup builds in CI and local

  7. kennykartman

    I knew that makepad devs were focused on build times, but didn't imagine this much!

  8. knuckleheads

    After working on https://github.com/PowderworksCode/headstart and some good conversations with the compiler team, I've been working on finding a way to make big changes to speed up rust while also respecting their wishes around the usage of LLM's. I don't really want to support a vibe slopped fork of rustc/cargo that is full of patches that are pretty much immediately out of date, and I don't think anyone else does either, at least not in a long term dependable way. I also don't feel like recreating daemons from the ground up, I would rather build on top of what already exists and make that compile faster and have better performance.

    https://breakneck.powderworks.dev/

    It's not done yet nor do I have enticing numbers to show, but I think in a few weeks Breckneck Rust will be someplace nice. For big changes such as getting all crates in the same process, I've been having Claude develop and use a mass static code rewriting tool. So instead of having an agent go and found all the places where LOCAL_CRATE_ID is defined and used, a query finds it and then rewrites can target it and it's surroundings.

    My hope is that mass code rewrites are more acceptable to the compiler team, in that they can author, review and debate the rewrites ahead of time without any time pressure. Listening to the team, there were things they might want to do/try (dropping memory, all crates in one process), but the changes are so comprehensive that to do them by hand is effectively a stop the world process. […]

More from this day

2026-11-12