Skip to content
Skip to Content

Kache

Install Kache v2, verify reuse, and find the guide for your workflow

Kache reuses matching compiler outputs for Rust, C/C++, and CUDA. Keep using your build tools; Kache restores eligible work from a shared local store and compiles the rest. Optional remote storage shares that work between machines.

Start with a local build

Install Kache v2.1.1:

cargo install kache --locked --version 2.1.1
kache init
kache doctor --probe
cargo build

An unversioned install selects the latest stable release. The upgrade guide explains the paired kache/kache-engine installation and migration from 1.x or a v2 preview.

You need Rust 1.95 or newer to install through Cargo. Prebuilt packages are available in the installation guide. kache init shows its setup plan before applying changes.

A fresh cache needs a build to fill it. If Cargo already has up-to-date outputs, it skips the compiler and Kache has nothing to restore. Follow the quick start to verify reuse in two worktrees with separate target directories.

Set up your workflow

TaskGuide
Upgrade from 1.x or a v2 previewUpgrading to v2
Share artifacts and private incremental state between worktreesWorktrees
Understand disk use or reclaim old build outputStorage and cleanup
Configure Windows Rust, PDB, clang-cl, or CUDA cachingWindows builds
Cache Make, CMake, or build-script C/C++C and C++
Cache CUDA object compilationsCUDA
Cache Rust documentationRustdoc
Use Kache with cargo-mutantsMutation testing
Share work between machinesRemote cache
Configure GitHub Actions or another CICI setup
Change storage limits or build policyConfiguration
Use local Blaze routingBlaze

Understand a build

Start with Troubleshooting if a build has unexpected misses or no hits. Use Monitor to inspect live activity and the full report to save a build's results.

For the details, read cache keys, build-script inputs, concurrent builds, and storage deduplication.

Current support

AreaSupport
Rust librariesLinux, macOS, and Windows
Rust executables, test binaries and build scriptsCached by default on Linux and macOS, off by default on Windows (cache_executables). Build-script runs are cached on Linux and macOS
C and C++ object compilationGCC, Clang, Apple Clang, and clang-cl. MSVC cl.exe is not cached
CUDA object compilationSingle-source nvcc -c and -dc
Rust documentationUnix with compatible Cargo versions and unstable rustdoc flags. Rust 1.99 and Windows pass through
Local cacheContent-addressed storage with automatic garbage collection
Remote cacheS3-compatible storage, GCS, filesystems, and OCI registries
Build visibilityLive monitor, stats, miss explanations, and reports
Incremental editsManaged target-local state and compatible donor seeds with supported rustc 1.98+
Optional Blaze routingMain only; local default-profile commands on Linux and Apple silicon macOS

Kache passes unsupported compiler invocations through unchanged. A passthrough is not a cache hit or miss. Its reason appears in the monitor's Why tab and in the Not cached section of kache stats --full.

Reference and measurements

Feedback

If Kache behaves differently from these docs, open a bug report. For a missing compiler, remote backend, or workflow, request a feature.

Available for:
Apple macOS logomacOSMicrosoft Windows logoWindowsLinux logoLinux
Download Kunobi