rust-lang / rust-lang/cargo

Add an API to generate registry index data

Open
#4,497 25 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-cargo-api A-registries C-feature-request S-needs-design T-cargo
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

See RFC 2141 for more details/context.

Currently, the knowledge of what goes in the registry index in what format lives in crates.io:

In order to support minimal registries, we'd like cargo to be able to generate the JSON information that should go into a registry for the current crate.

Cargo does already understand how to read these entries! We need to teach it how to create them as well :)

So as I understand it, this would involve:

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

Start with RFC 2141 and the RegistryPackage struct in src/cargo/sources/registry/mod.rs, then read the registry operation that sends package information to crates.io in src/cargo/ops/registry.rs. Trace how Cargo reads registry entries before deciding how the new command should construct and serialize the current crate's metadata. Done means a command generates the registry JSON and writes it to stdout.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.