From c83f7bb1bacd91d172ca0b91bab381a77e4fe9f4 Mon Sep 17 00:00:00 2001 From: cassaundra Date: Wed, 26 Apr 2023 12:36:33 -0700 Subject: [PATCH] Update docs regarding rust_version in the publish API --- src/doc/src/reference/registry-index.md | 5 ++--- src/doc/src/reference/registry-web-api.md | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/doc/src/reference/registry-index.md b/src/doc/src/reference/registry-index.md index 1b779c2772f..9e5be3e5bf6 100644 --- a/src/doc/src/reference/registry-index.md +++ b/src/doc/src/reference/registry-index.md @@ -224,9 +224,8 @@ 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. +> * Although `rust_version` is included here, [crates.io] will ignore this field +> and instead read it from the `Cargo.toml` contained in the `.crate` file. > > For [`cargo metadata`], the differences are: > diff --git a/src/doc/src/reference/registry-web-api.md b/src/doc/src/reference/registry-web-api.md index 147ababd54e..347eb7280b9 100644 --- a/src/doc/src/reference/registry-web-api.md +++ b/src/doc/src/reference/registry-web-api.md @@ -161,7 +161,10 @@ considered as an exhaustive list of restrictions [crates.io] imposes. }, // The `links` string value from the package's manifest, or null if not // specified. This field is optional and defaults to null. - "links": null + "links": null, + // The minimal supported Rust version (optional) + // This must be a valid version requirement without an operator (e.g. no `=`) + "rust_version": null } ```