Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the sparse-index RFC #158

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Support for the sparse-index RFC #158

wants to merge 3 commits into from

Conversation

Hirevo
Copy link
Owner

@Hirevo Hirevo commented May 26, 2023

This PR implements Cargo's new sparse-index RFC (RFC #2789), which has become stable since Rust 1.68 (March 9th, 2023).

Cargo plans to make the use of this new protocol be the default for crates.io in Rust 1.70 (June 1st, 2023).
Because of this, I predict users to start to expect every registry to behave that way quite soon, if it isn't already the case.

This protocol makes working with registries with a very large crate index way snappier for users, because cargo can selectively request the metadata for the crates it is specifically interested in for the current operation it is doing, instead of having to bring its local cloned copy of the index up-to-date using git, which can take a significant amount of time for a large crate index, or when the local clone hasn't been updated for a while and the crate index has been very active.

The routes for the sparse index API are all under the /api/v1/sparse/ base path.

The Indexer trait has been extended a bit, notably to allow retrieving the crate configuration file.

Task-list before merging

  • Implementation
    • Basic support
    • Etag and If-None-Match support
    • Last-Modified and If-Modified-Since support
    • canonical field in index configuration file (rust-lang/cargo#10964)
  • Documentation
    • Registry configuration
    • Cargo (user-side) configuration

@Hirevo Hirevo added C-documentation Category: Documentation C-enhancement Category: Enhancement P-high Priority: High M-api Module: Programmatic API M-deployment Module: Deployment labels May 26, 2023
@Hirevo Hirevo self-assigned this May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-documentation Category: Documentation C-enhancement Category: Enhancement M-api Module: Programmatic API M-deployment Module: Deployment P-high Priority: High
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants