Skip to content

Commit 9ae7533

Browse files
committed
docs(ref): Set Rust version support expectations
1 parent 17ecc17 commit 9ae7533

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

src/doc/src/reference/rust-version.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ identifiers such as -nightly will be ignored while checking the Rust version.
1515

1616
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).
1717

18-
When used on packages that get published, we recommend [verifying the `rust-version`](../guide/continuous-integration.md#verifying-rust-version).
19-
2018
> **MSRV:** Respected as of 1.56
2119
2220
## Uses
@@ -37,3 +35,31 @@ Other tools may also take advantage of it, like `cargo clippy`'s
3735
[`incompatible_msrv` lint](https://rust-lang.github.io/rust-clippy/stable/index.html#/incompatible_msrv).
3836

3937
> **Note:** The `rust-version` may be ignored using the `--ignore-rust-version` option.
38+
39+
## Support Expectations
40+
41+
These are general expectations; some packages may document when they do not follow these.
42+
43+
**Complete:**
44+
45+
All functionality, including binaries and API, are available on the supported Rust versions under every [feature](features.md).
46+
47+
**Verified:**
48+
49+
A package's functionality is verified on its supported Rust versions, including automated testing.
50+
See also our
51+
[Rust version CI guide](../guide/continuous-integration.md#verifying-rust-version).
52+
53+
**Patchable:**
54+
55+
When licenses allow it,
56+
users can [override their local dependency](overriding-dependencies.md) with a fork of your package.
57+
In this situation, Cargo may load the entire workspace for the patched dependency which should work on the supported Rust versions, even if other packages in the workspace have different supported Rust versions.
58+
59+
**Dependency Support:**
60+
61+
In support of the above,
62+
it is expected that each dependency's version-requirement supports at least one version compatible with your `rust-version`.
63+
However,
64+
it is **not** expected that the dependency specification excludes versions incompatible with your `rust-version`.
65+
In fact, supporting both allows you to balance the needs of users that support older Rust versions with those that don't.

0 commit comments

Comments
 (0)