Skip to content

Break up alternate registry documentation #11476

Closed
@arlosi

Description

@arlosi

The documentation for registries is getting long and should be broken up (content taken from PR comment by @ehuss).

There are two audiences here, users (who are serviced by the "using" and "publishing" sections), and implementers (everything else).

An outline that I'm thinking of is:

  • Registries
    This top-level chapter should be written for the perspective of users, not implementers. It should have sections:

    • The current introduction that exists. Add links to the new sub-chapters here.
    • Using an Alternate Registry
    • Publishing to an Alternate Registry
    • Registry Protocols — This new section should give a very brief explanation that there exists "git" and "sparse", why to use one over the other, and how cargo chooses which to use. That should include a description of the sparse+ prefix, and the registries.crates-io.protocol setting.

Then underneath the "Registries" chapter, I would add a new "Running a Registry" chapter with two sub-chapters of its own:

  • Running a Registry
    This should have the current "running a registry" section. The first sentence that mentions "implemented by having a git repository" should be rewritten to accommodate the two different ways to set up the index.

    • Registry Index
      This should include the current "Index Format" section.
      The sentence "The index is stored in a git repository" needs to be rewritten to accommodate the new ways to access the index.
      I would add separate sections for index protocols, "config.json", description of the file layout, and descriptions of each package listing.
      The section on sparse indexes should have a section (or note) discussing the current limitations of sparse indexes. In particular, sparse registries are not yet ready to be used concurrently with git indexes, or to support transitioning from an existing git index. Point the reader to towards sparse registry: determine UX and URL handling #10964 for following further developments. If possible, help the reader to understand why the limitations exist, such as the fact that sparse+ will end up in Cargo.lock files, index entries, and .crate files. Perhaps make it clear that sparse+ can be used in a new registry that does not support git.
      The sparse section should include as much detail from https://hackmd.io/uzpul3sETzSumD2uj-2gTQ as possible. In particular:

      • Examples are often helpful. Showing how things look with index.crates.io would be a good start.
      • The "HTTP Behavior" section, including recommendations about using http/2 and such. Caching and cache invalidation should have its own section.
      • The "Nonexistent responses" section should also be included.
    • Registry Web API
      This should have the current Web API sections.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions