Open
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:
- here,
- which serializes an instance of this struct,
- which comes from here,
- most of which comes from cargo anyway, around here,
- which deserializes an instance of this struct
- which has a corresponding struct in cargo
- that gets created here
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:
- Derive
Serialize
for theRegistryPackage
struct - Create a new command, feel free to suggest another name, the first thought in my head is
generate-index-metadata
, that should:- Create an instance of
RegistryPackage
for the current crate, reusing code that sends relevant information to crates.io when appropriate - Serialize that struct to stdout
- Create an instance of