Skip to content

Caching

How do I cache Cargo dependencies?

Quick answer

Cache ~/.cargo/registry, ~/.cargo/git and target/ keyed on Cargo.lock.

The detail that matters

Add sccache for cross-branch reuse — target/ alone only helps the branch that populated it.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.