From 99616d59fea8178e0b0ad7bc63839f49ad462e41 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 2 Oct 2024 12:55:43 -0500 Subject: [PATCH] docs(ref): Set Rust version support expectations --- src/doc/src/reference/rust-version.md | 30 +++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/doc/src/reference/rust-version.md b/src/doc/src/reference/rust-version.md index ba674c961e65..68c15269a12a 100644 --- a/src/doc/src/reference/rust-version.md +++ b/src/doc/src/reference/rust-version.md @@ -15,8 +15,6 @@ identifiers such as -nightly will be ignored while checking the Rust version. To find the minimum `rust-version` compatible with your project, you can use third-party tools like [`cargo-msrv`](https://crates.io/crates/cargo-msrv). -When used on packages that get published, we recommend [verifying the `rust-version`](../guide/continuous-integration.md#verifying-rust-version). - > **MSRV:** Respected as of 1.56 ## Uses @@ -36,3 +34,31 @@ Other tools may also take advantage of it, like `cargo clippy`'s [`incompatible_msrv` lint](https://rust-lang.github.io/rust-clippy/master/index.html#/incompatible_msrv). > **Note:** The `rust-version` may be ignored using the `--ignore-rust-version` option. + +## Support Expectations + +These are general expectations; some packages may document when they do not follow these. + +**Complete:** + +All functionality, including binaries and API, are available on the supported Rust versions under every [feature](features.md). + +**Verified:** + +A package's functionality is verified on its supported Rust versions, including automated testing. +See also our +[Rust version CI guide](../guide/continuous-integration.md#verifying-rust-version). + +**Patchable:** + +For license that allow it, +users can fork your package, modify it, and [override their local dependency](overriding-dependencies.md) to use their fork. +Cargo may load the entire workspace for a patched dependency which should work on the supported Rust versions. + +**Dependency Support:** + +In support of the above, +it is expected that each dependency's version-requirement supports at least one version compatible with your `rust-version`. +However, +it is **not** expected that the dependency specification excludes versions incompatible with your `rust-version`. +In fact, supporting both allows you to balance the needs of users that support older Rust versions with those that don't.