Overview

cargo-warm

A Rust CLI that seeds fresh worktrees from an already-warm Cargo cache using copy-on-write, while keeping every worktree independently writable and leaving build validation to Cargo and rustc.

RustCLI
Git WorktreesBuild Tools
cargo-warm

I built cargo-warm for Rust worktrees that have fresh source but none of the useful compiler state sitting in the checkout next door. Parallel agents make that mismatch particularly visible: the work can start independently, but each new workspace begins by paying for a cold build.

The obvious shortcut is one shared target directory. cargo-warm takes a different approach: fork the warm state into a cache the new worktree owns. On macOS that uses APFS copy-on-write; on Linux it uses reflink-capable filesystems. Each destination is independently writable, so separate worktrees don’t contend over one mutable Cargo directory.

Reuse the starting point, keep the compiler’s verdict

Inherited state is a head start, not evidence that the build is valid. Cargo and rustc still do their normal validation, and incompatible state falls back to revalidation. A physical-copy fallback is available only when explicitly requested, rather than quietly turning a cheap clone into a large copy.

I split the workflow into a diagnostic step and a worktree hook. cargo warm doctor inspects the toolchain, cache layout, build scripts, and nearby warm checkouts, then recommends a profile. cargo warm seed belongs in the worktree-creation hook. The profiles range from cloning state and repairing safe freshness metadata to priming relocatable incremental state and re-establishing a package’s build-script boundary.

That makes it a useful companion to the worktree workflows behind my agent tooling. It doesn’t change how an agent edits or how Rust decides whether a check passes. It changes how much useful state is already there when the agent starts.

Use ← and → to navigate