RC RANDOM CHAOS

Relax: Rust JIT Compiler for Fast Development

· via Hacker News

Original source

Relax: JIT compiler for Rust to reduce build times

Hacker News →

Relax is a JIT compiler and runtime for Rust that replaces the traditional rustc/LLVM/linker pipeline. Instead of compiling before running, Relax compiles each function when it’s first called, optimizes hot code in the background, and applies code changes to the running process without requiring a restart. This accelerates the edit-run development cycle compared to traditional builds.

The trade-off is execution speed: code run through Relax takes 1.12× the time of rustc —release on x86-64 and 1.24× on ARM64 when measured across 21 workloads. Memory overhead is also higher due to keeping the compiler and all code versions in the same process. The tool remains incomplete: not all Rust crates run yet, some code changes require process restarts, and borrow checking happens in the background and can delay execution. It’s designed for development iteration, not production builds.

Relax originated in the Makepad project, where it powers rapid iteration on AI agent development. Makepad’s infrastructure runs over 300 build and test jobs per hour across nine parallel lanes, applying code edits to live processes with a median latency of 3.6 seconds.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.