Skip to content

Commit

Permalink
docs(ref): Set Rust version support expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 2, 2024
1 parent 23ddfdd commit 99616d5
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions src/doc/src/reference/rust-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

0 comments on commit 99616d5

Please sign in to comment.