Relax eliminates the traditional 'build-then-run' cycle in Rust development by compiling functions only when they are first called. Developed as part of the Makepad project, this JIT (Just-In-Time) runtime allows developers to patch edits directly into a running process, maintaining the program's state instead of requiring a full restart.
On-Demand Compilation and Hot Patching
Unlike the standard Cargo and rustc workflow, where a program must be fully compiled before execution, Relax runs a Cargo package straight from source. It compiles each function the first time it is invoked and optimizes 'hot' functions in the background while the program is running.
A key feature of this approach is hot patching. When a developer saves a file, Relax rechecks and recompiles the changed functions and swaps them into the running process. This allows for immediate iteration where the application's state—such as a 3D game's current frame or a UI's current layout—is preserved across code changes.

This image illustrates the concept of hot patching where application state, such as a 3D game's particle motion, is preserved across code changes.
“Relax runs your program while it builds it.”
— Relax: Rust without the wait
JIT-Specific Developer Tools
Because Relax operates as a JIT runtime, it provides specialized debugging and profiling capabilities. It includes a 'pause on panic' feature that parks a thread with its stack intact, allowing developers to read locals and evaluate Rust expressions directly within the panic frame.
The system also provides a 'flight recorder' that saves the last few minutes of thread events and a 'why-hung' command to diagnose deadlocks or blocked threads. For performance analysis, it offers a 'why-slow' tool that samples both JIT and native frames to identify hot lines and call trees.
Performance Trade-offs and Limitations
There is a measurable performance cost to using Relax compared to a native-CPU build. In steady-state, Relax-generated code is slower than rustc's --release output, with a geomean slowdown of 1.22x to 1.25x against native builds across 21 workloads.

The table provides specific data points regarding the performance overhead of using the Relax JIT runtime compared to native builds.
The system also consumes more memory because the compiler, its caches, and every published code version share the program's process. Additionally, while function bodies can be hot-patched, structural changes like modified struct layouts, imports, or trait headers still require a session relaunch.
What Hacker News readers are saying
- Alternative: One commenter who shared their experience with a different tool noted that they have been using "mr boxington" to help with their workflow. comment ↗
- Skeptical: One commenter expressed skepticism regarding the project's scope, suggesting that a complete Rust re-implementation is an incredibly ambitious undertaking. comment ↗
- Skeptical: Another user questioned the premise of the project, arguing that Rust's build times have not been a significant issue for a decade and that it differs fundamentally from Lisp. comment ↗
- Skeptical: One commenter suggested that the project is a prime example of what AI agents can achieve by tackling ambitious but conceptually well-trodden tasks that previously required too much manual effort. comment ↗
Summarized opinions from the Hacker News thread, not verified facts. Read the full discussion ↗