Hacker News AI · 10/20/2026, 23:50:29

ra-jit Launches: 24x Faster Rust Compilation with Live Edits

68AI Score
Executive Summary

Open-source project ra-jit introduces JIT compilation for Rust using rust-analyzer, enabling millisecond live edits in running programs. By incrementally rebuilding only modified functions, it cuts build time from 169ms to 7ms (24x speedup), though it currently lacks borrow checker support and limits live preview to Apple Silicon.

SOURCE COVERAGEFull Original Report

Contents6 sections

ra-jit

Edit Rust. See it change in milliseconds, in the program that is already running.

Text
nix run github:indexable-inc/ra-jit

That opens a Game of Life window you can edit while it runs (live on macOS Apple silicon).

Editing the running Game of Life: rule, colours and speed change live

For release news: Watch → Custom → Releases on GitHub.

What you get

  • Live edits. Save a file and the running program has the new code about a millisecond later. Its state stays. (docs/live.md)
  • Fast builds. After the first build, an edit rebuilds only the functions you changed. No rustc, no waiting.
  • Same cargo. cargo ra-jit build|run|test|check in any project.

How fast

Live edit to running code, Game of Life demo (median of 20 edits, one 96-core Linux machine):

Editincremental cargo buildra-jit live
One function169 ms7 ms24x
One function, 300 new functions added282 ms60 ms4.7x

Edit, then build (generated 200-crate workspace, Linux x86-64, 8 CPUs, both warm and incremental, same linker, median of three):

Editcargora-jit
A function in the main crate1.76 s0.42 s4.2x
A function in a crate everything depends on6.33 s0.60 s10.6x
Functions in 30 crates at once6.26 s0.62 s10.1x
A new function2.09 s0.56 s3.7x
A signature used in every crate13.87 s10.87 s1.3x

Not measured yet: real projects, and a build from nothing against a fresh cargo build (#benchmarks).

Try it on your project

Text
nix run github:indexable-inc/ra-jit#ra-jit -- build

No nix? cargo +1.99.0 install --locked ra-jit, or put the binaries from a release on your PATH. Then use Rust 1.99.0 with its source: rustup toolchain install 1.99.0 -c rust-src && rustup override set 1.99.0.

Use it as your normal cargo build

Text
nix profile install github:indexable-inc/ra-jit#ra-jit
ra-jit enable

From then on plain cargo build, run, test and check in any project go through ra-jit. ra-jit disable puts your cargo config back.

Live edits

Add the crate and poll once per frame:

TOML
ra-jit-live = "0.1"
RUST
let mut live = ra_jit_live::Live::start().ok();
loop {
    if let Some(outcome) = live.as_mut().and_then(|it| it.poll()) {
        eprintln!("ra-jit: {outcome}");
    }
    // ...your frame
}

What to know

  • Live edits work on macOS Apple silicon only. Elsewhere you still get fast builds.
  • No borrow checker: keep running cargo check.
  • Rust 1.99.0 only.
  • Changing a struct the program is using asks for a restart.

More: how it works, full results, what is supported.