ra-jit
Edit Rust. See it change in milliseconds, in the program that is already running.
nix run github:indexable-inc/ra-jit What you get
- Live edits. Save a file and the running program has the new code about a millisecond later. Its state stays.
- 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|checkin any project.
How fast
Edit one function, then build. 200-crate workspace, median of three.
| Edit | cargo | ra-jit |
|---|---|---|
| Function in the main crate | 1.76 s | 0.42 s |
| Function in a crate everything depends on | 6.33 s | 0.60 s |
Try it
nix run github:indexable-inc/ra-jit -- buildUse it as your normal cargo build
nix profile install github:indexable-inc/ra-jit
ra-jit enablePlain cargo build, run, test and check then go through ra-jit. ra-jit disable undoes it.
Live edits
ra-jit-live = { git = "https://github.com/indexable-inc/ra-jit" }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: 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, GitHub.
Credits
Built on rustd (DioxusLabs), which it forked, and on rust-analyzer. Not endorsed by either. Made at ix for den's native app. MIT or Apache-2.0.