kache 1.0.0
Compile it once.
Store it once.
A compiler cache for Rust, C/C++, and CUDA. Every worktree reuses stored build output, skipping the rebuild and, on copy-on-write filesystems, the extra copy of target/. Run kache init once, then keep using cargo.
cargo install kache --lockedOne more worktree costs
Disk added
Build time
Free space used on APFS. The shared store takes another 423.4 MiB once. Results from one project; disk use varies.
The second worktree
422.4 MiB restored. 0 bytes copied.
For this project, a fresh build with plain cargo used 546.9 MiB of free space. With a warm kache store, the next worktree restored 422.4 MiB of output and used 39.1 MiB of free space.
kache stores build output in content-addressed blobs and restores it as copy-on-write clones on APFS, ReFS, btrfs, and reflink-capable XFS. Other filesystems use hardlinks or copies, depending on the file.
~/wt-feature $ kache stats --full --last-buildStorage Restored 422.4 MiB 100.0% without copying, 0 B copied Stored 431.3 MiB as 423.4 MiB of blobs, 7.8 MiB saved by dedup Entries 559 unique keysTiming TOTAL AVERAGE Cache hits 53 s 318 ms per hit Compiles 0 ms 0.0 ms per crate cache key 42 s 250 ms lookup 62 ms 0.4 ms restore 1 s 11 ms Startup 1 s 10 ms per crate Dep-info pre-pass 0 ms 0.0 ms per run, 0 runsMost valuable hits CRATE AVOIDED SIZE tokio 3 s 34.2 MiB axum 3 s 13.4 MiB clap_builder 2 s 16.9 MiB
When it misses
It tells you why.
Turning on serde’s rc feature made serde rebuild. kache explain serde compares the new cache key with stored entries and identifies the changed feature.
$ kache explain serdeWhy `serde` missed: Last miss: 2026-10-05T21:05:29 (key: 34e9ab5f71ed) target: host profile: dev features: default, derive, rc, serde_derive, std Diagnosis: key mismatch -- 1 other stored entries differ from key 34e9ab5f71ed Differences detected: - different features vs b0828454871c: [default, derive, rc, serde_derive, std] vs [default, derive, serde_derive, std] Dependency cascade: not analyzed (no per-dependency digests recorded). Enable [cache] explain_miss to record them, then rebuild. Recent events: [21:04:27] miss key: b0828454871c 1.1s 1.8 MiB [21:04:56] local_hit key: b0828454871c 351ms 1.8 MiB [21:05:29] miss key: 34e9ab5f71ed 799ms 1.8 MiB Key changed: b0828454871c (last hit) -> 34e9ab5f71ed (miss)
Install. Init. Build.
Choose an install method, run kache init once, then keep using Cargo, Make, CMake, or Ninja.
kache initUsing scripts or CI? kache init -y runs the same setup without prompts.
kache doctor- uses: kunobi-ninja/kache-action@v1kache init --shims && export PATH="$HOME/.local/lib/kache/shims:$PATH"What's supported
- Rust
- Libraries and build scripts on Linux, macOS, and Windows. Executables on Linux and macOS by default; off on Windows until you turn them on.
- C, C++, and CUDA
- Single-source object compiles through GCC, Clang, Apple Clang, clang-cl, and nvcc. Unsupported invocations pass through unchanged.
- macOS, Linux, Windows
- Release binaries for x86_64 and ARM. Linux musl, macOS, Windows MSVC.
- Remotes
- S3-compatible, GCS, OCI, and filesystem remotes share Rust, C/C++, and CUDA entries. clang-cl debug objects stay on the machine.
- Benchmarks
- Cold and warm builds, cross-checkout reuse, concurrent jobs, and disk use. See the workloads and measurement method. Full reference →
kache --help
Inside the CLI
After kache init, keep using your build tools. These commands help you inspect the cache.
$ kache --helpCommands: init Set up caching for Cargo and C/C++ builds doctor Diagnose setup issues and verify cache integrity config Open the configuration editor stats Hit rate, time saved and cache size; --full for the whole report clean Free disk space: remove old target directories, or empty the cache monitor Live dashboard of builds and the cache explain Explain why a crate, or the latest build, missed the cache list List cache entries, or one crate's entries in detail sync Pull from and push to the configured remote login Log in to the planner with your Kunobi account logout Log out of the planner and revoke the stored Kunobi session daemon Show the background daemon's status, or start, stop or install it
From kache 1.0.0; completions and help omitted. Full reference →
>_ open source
Feedback and contributions welcome
We read every issue. A miss you cannot explain, a toolchain we do not cover yet, a benchmark that disagrees with ours: open one with the repro and it lands in front of the people who wrote the code.
kunobi-ninja/kache · pull requests welcome, including the first one