makepad/relax
Developer ToolsA live Rust compiler and JIT runtime that runs Cargo packages from source and hot-patches edits into the running process.
What it is
Relax is a Rust toolchain replacement: it lexes, parses, type-checks and borrow-checks a Cargo package, then compiles each function the first time it is called and patches changed functions into a running process when a file is saved. No rustc, LLVM or system linker sits in the loop, and the whole pipeline ships as one Rust library with no crates.io dependencies. It targets x86-64 and AArch64 and is intended for fast edit-run-test cycles, including AI-agent-driven development loops.
Quick start
You need a stable Rust toolchain. Build the runner from a clone, then create and run a package:
git clone https://github.com/makepad/relax
cd relax
cargo build --release --manifest-path Cargo.toml -p relax-runner --bin relax
cd /tmp
cargo new hello
cd hello
/path/to/relax/target/release/relax run --quiet hello
/path/to/relax/target/release/relax test hello
/path/to/relax/target/release/relax check hello
Run relax inside the package folder and pass the package name, not a path. The runner reads Relax's std from the checkout it was built in, so keep the relax directory in place. On the maintainers' measurements, the first relax run of hello took 0.24 s on a 16-core x86-64 Linux box and 0.97 s on a 10-core arm64 Mac; later runs took 0.01–0.07 s and 0.03–0.04 s respectively (L280-L320).
Constraints
- Performance: optimized Relax code is still slower than rustc
--releasebuilt for the native CPU. Measured ratios range from 1.14× to 1.26× on several profiled workloads and 2.29× on a dense numeric kernel because loops are not vectorized yet where LLVM still wins. Comparisons against a plain portable--releaseare not yet measured. - Platforms: code generation covers x86-64 and AArch64; the repository builds and its tests pass on Linux x86-64 and macOS arm64 as tested by the maintainers, but Windows is not tested.
- Language coverage: not everything compiles yet; the known gaps list unsupported cases with repros.
- Native code: crates that must stay native (OS, GPU, audio) interact with JIT code through
#[relax_api]and the C ABI. - Network and cache: dependency-free packages can run offline; crates.io dependencies are fetched and SHA-256 checked unless offline mode is set. Compile artifacts go into the package's
target/makepad-run, roughly 120–190 MB forhello, andrelax cleanremoves them. - License: MIT, with separate notices for the bundled std sources LICENSE.
HotRepo's take
Relax's claim is unusual in scope: it replaces rustc, LLVM, the linker and much of Cargo, and its README is candid that the generated code is currently slower than LLVM in steady state, with a re-measurement underway. The 100 stars recorded in the Rust new-project snapshot on 2026-11-12 came within hours of the repository being created, so they reflect early attention rather than sustained adoption, and there is no daily all-language ranking to compare against. The project is best approached as an experimental toolchain: promising for short edit-test loops, not yet a drop-in replacement for release builds.
Written by AI from the project's README, updated . The project's own docs are the source of truth.
You might also like
- rust-lang/cargoRust's package manager, used to download dependencies and build Rust projects.
- indexable-inc/ra-jitCuts Rust edit-rebuild cycles to milliseconds by patching only changed functions into an already-built program.
- rust-lang/rustThe Rust compiler, standard library, and documentation source, for developers building or contributing to Rust.