Skip to content

sparse registry: transition plan for index.crates.io as default #10965

Closed
@ehuss

Description

@ehuss

This is an open-ended issue to explore what will be necessary to make index.crates.io the default for accessing the crates.io index.

One concern about flipping the switch is that many users may not be prepared to be able to communicate to index.crates.io. They may have firewall rules or other restrictions that limit them to communicating with github.com that may not be easy to change. If we flip the switch, I think we should try to accommodate them as best as possible. Some options:

  • Provide an easy config to use one index or the other.
  • Provide a clumsy config to use one index or the other (using source-replacement).
  • Auto-detect if Cargo cannot communicate to index.crates.io, and fall back to github.com.

Automatic fallback

My guess is that the automatic fallback will be somewhat difficult to implement. However, I would like to explore to see if it is possible or desirable. Cargo could treat a limited subset of errors trying to contact index.crates.io as an indication that it should switch to github. However, that seems risky since any transient error could cause cargo to download the index from github which we want to avoid. Is this even feasible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions