Skip to content

Commit 4dd2b28

Browse files
committed
docs(ref): Specify 'rust_version' in Index format
See rust-lang/crates.io#6267
1 parent 95535a9 commit 4dd2b28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/doc/src/reference/registry-index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ explaining the format of the entry.
199199
"features2": {
200200
"serde": ["dep:serde", "chrono?/serde"]
201201
}
202+
// The minimal supported Rust version (optional)
203+
// This must be a valid version requirement without an operator (e.g. no `=`)
204+
"rust_version": "1.60"
202205
}
203206
```
204207

@@ -221,6 +224,9 @@ The JSON objects should not be modified after they are added except for the
221224
> * The publish API includes several other fields, such as `description` and `readme`, which don't appear in the index.
222225
> 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.
223226
> This additional information is typically added to a database on the registry server.
227+
> * `rust_version` is not included. If a registry chooses to support this
228+
> field, they must read it from the `Cargo.toml` contained in the `.crate`
229+
> file.
224230
>
225231
> For [`cargo metadata`], the differences are:
226232
>

0 commit comments

Comments
 (0)