Nothing is compiled twice.
Every compiled crate goes into a content-addressable store shared by every project, branch, profile and machine. Same inputs, same artifact — reused in milliseconds.
- units compiled by check right after build, on Rune's own workspace
- 0
- for a fresh checkout of Rune's workspace, where Cargo rebuilds for 84 s
- 0.18 s
- Cargo's speed switching back to a branch, on a 25-crate workspace
- 34×
A key for everything that went in.
Every compiled crate — a unit — is stored under a key that describes it completely. A build looks each unit up first and compiles only what is missing; the store is shared by every project, profile and target on the machine.
UnitKey = hash( package + source identity # checksum, commit or files + target kind, crate types, edition, features + compiler, RUSTC_WRAPPER, RUSTC_WORKSPACE_WRAPPER + effective rustflags, linker, lints, [env] + the unit's effective profile + every dependency's own key + the outside inputs it read, by value)
Correct before fast.
A false rebuild is acceptable; reusing a wrong artifact is not. Store objects are immutable, read-only, published atomically and verified on every hit — and the key follows exactly what each unit depends on.
Registry and git packages
Immutable, so their key never reads the disk: a registry package is its index and checksum, a git package its resolved commit. A branch name never enters a key.
Your crates, by the files they read
After a crate compiles, Rune records the files rustc read — its modules and what include_str! pulled in. Editing a README, a doc or an integration test compiles nothing.
The outside world
What a unit read beyond its source — rerun-if-env-changed, linked native libraries, env! variables, the C toolchain — is part of the key, by its current value.
Build scripts, on their own
A script has its own key: its configuration, build-dependencies and the files it watches. Editing the rest of the package does not run it again.
Going back is instant
A record belongs to the contents of the crate it describes, so checking out an earlier commit finds that version's record — and its artifact.
Warnings included
Compiler warnings are stored with the artifact and replayed on every cache hit, so nothing goes quiet.
Built once, used by everything.
The same store serves type-checking and building, every process on the machine, and every member of a workspace.
check after build is free
A checked crate takes the stored result of the same crate fully built. On Rune's own workspace, check right after build compiles nothing: 0.3 s, where it recompiled 148 units in 6 s before.
Several builds at once
An editor's check next to a terminal build, CI shards on one checkout: no lock on the target directory, and a process only waits when another is building the same unit. Four concurrent builds compiled 10 units in all, not 36.
One build of each dependency
With build.feature-unification = "workspace", every subset of a workspace reuses the same dependency builds — what cargo hakari achieves, without the generated crate.
A store that stays small.
The store caps itself at a tenth of its disk (5–50 GiB), compresses entries no build has used for a week and removes them after a month — in the background, at most once a day. Pin what a workspace needs to keep it through every cleanup.
rune cas du # what takes the space, and how much is idlerune cas pin # keep this workspace's build, check and test entriesrune cas pins # what is pinnedrune config set cas.max-size 20GB # or auto: a tenth of the diskrune config set cas.max-age 30d # remove entries unused this longrune config set cas.compress-after 7d # zstd, decompressed on use
Try it on your project.
Nothing to migrate and nothing to undo: your project keeps working with plain cargo.
$ curl -fsSL https://www.runepm.com/install.sh | sh