rustydocs
Concepts

Content store

pnpm-style content-addressable storage for crates, blobs, and directory trees.

The content store is rusty's global deduplication layer. Instead of every project copying crate sources into its own target/ tree, rusty ingests immutable blobs keyed by digest.

Layout

Store root: $RUSTY_HOME/store/ (see rusty store path).

Blobs are sharded by digest prefix (aa/bb/<hex>). Crate tarballs and git snapshots are tracked through a refs index so garbage collection knows what is still reachable.

Operations

rusty store path          # print store root
rusty store stats         # blob count + bytes on disk
rusty store put <file>    # ingest a file, print digest
rusty store has <digest>  # exit 0 if present
rusty store gc --dry-run  # preview unreachable blob reclamation

Directory trees

rusty store tree put <dir>           # ingest tree, print manifest hex
rusty store tree ls <hex>            # list entries
rusty store tree get <hex> <dest>    # materialize to disk

Trees are manifests pointing at content blobs — materializing a tree does not duplicate blob data already in the store.

Crates

rusty store crate ingest <name> <version> <url|file>
rusty store crate materialize <name> <version> <dest>
rusty store crate list

rusty fetch is the high-level path most developers use; it resolves the lockfile and ingests every crate into the store automatically.

Garbage collection

rusty store gc drops blobs not referenced by crate, git, or explicit keep refs.

rusty store gc --dry-run
rusty store gc --keep-ref <id>   # pin a ref before gc

Run gc during maintenance windows on shared CI machines where many ephemeral projects ingest overlapping dependency sets.

Why CAS

cargo defaultrusty CAS
Per-project registry/ copiesOne blob per unique tarball
Hard to share across agentsAgents reuse identical digests
Opaque cache dirsAddressable by hex — auditable and portable

The store is the foundation for offline cargo --offline builds and for layer keys that reference exact source digests.

On this page