tooldev toolsopen source
Content-addressed compiler cache for Rust, C/C++ and CUDA that reuses build outputs across git worktrees and CI runs, sharing disk blocks with the cache on copy-on-write filesystems.
Agents working in parallel worktrees make Rust builds expensive: every worktree compiles the same crates into its own target directory. Kache sits in front of the compiler and restores matching outputs instead, for Rust libraries, executables and build scripts, plus GCC, Clang and single-source CUDA objects. Compiles with the same cache key share one in-flight build.
Identical output bytes are stored once under a disk budget, and on filesystems with copy-on-write cloning the restored files share blocks with the cache. In the project's Firefox 151 benchmark on macOS/APFS, a second worktree added about 3 GB of new data, against 16.7 GB with sccache.
Install with cargo install kache --locked, then kache init sets up Cargo's compiler wrapper and a background service, and kache doctor --probe checks the setup. The cache can be shared through S3-compatible storage, Google Cloud Storage, a shared filesystem or an OCI registry, and kache explain shows why a build missed. Apache-2.0.
#rust#performance#ci#cli