Skip to content

Commit c83f7bb

Browse files
committed
Update docs regarding rust_version in the publish API
1 parent 5554889 commit c83f7bb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,8 @@ The JSON objects should not be modified after they are added except for the
224224
> * The publish API includes several other fields, such as `description` and `readme`, which don't appear in the index.
225225
> 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.
226226
> 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.
227+
> * Although `rust_version` is included here, [crates.io] will ignore this field
228+
> and instead read it from the `Cargo.toml` contained in the `.crate` file.
230229
>
231230
> For [`cargo metadata`], the differences are:
232231
>

src/doc/src/reference/registry-web-api.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ considered as an exhaustive list of restrictions [crates.io] imposes.
161161
},
162162
// The `links` string value from the package's manifest, or null if not
163163
// specified. This field is optional and defaults to null.
164-
"links": null
164+
"links": null,
165+
// The minimal supported Rust version (optional)
166+
// This must be a valid version requirement without an operator (e.g. no `=`)
167+
"rust_version": null
165168
}
166169
```
167170

0 commit comments

Comments
 (0)