rust-lang / rust-lang/cargo

Optimizes Cargo's registry cache format for fewer files

Open
#6,908 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-caching Performance S-needs-mentor
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

First implemented in https://github.com/rust-lang/cargo/pull/6880 Cargo now has an on-disk cache for the registry index which avoids loading from git and parsing extraneous JSON which doesn't end up getting used.

This format isn't fantastic for Windows, however, since it has an extra file-per-crate in the index. @Eh2406 recommended a different implementation strategy which would reduce the number of files in play, and we should likely implement that!


Implementation history:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read PR 6880 and Eh2406's linked implementation-strategy comment to understand the current registry index cache and the proposed alternative. Review the implementation history in PR 13515, then identify the relevant Cargo cache entry points and tests. Done means the registry cache uses fewer files, especially on Windows, while preserving its existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.