Skip to content

Commit

Permalink
docs(ref): Specify 'rust_version' in Index format
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Apr 26, 2023
1 parent 95535a9 commit 4dd2b28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/doc/src/reference/registry-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ explaining the format of the entry.
"features2": {
"serde": ["dep:serde", "chrono?/serde"]
}
// The minimal supported Rust version (optional)
// This must be a valid version requirement without an operator (e.g. no `=`)
"rust_version": "1.60"
}
```

Expand All @@ -221,6 +224,9 @@ The JSON objects should not be modified after they are added except for the
> * The publish API includes several other fields, such as `description` and `readme`, which don't appear in the index.
> These are intended to make it easier for a registry to obtain the metadata about the crate to display on a website without needing to extract and parse the `.crate` file.
> This additional information is typically added to a database on the registry server.
> * `rust_version` is not included. If a registry chooses to support this
> field, they must read it from the `Cargo.toml` contained in the `.crate`
> file.
>
> For [`cargo metadata`], the differences are:
>
Expand Down

0 comments on commit 4dd2b28

Please sign in to comment.