Skip to content

Rust Version#

Builds on CI always run against the most stable rust version, but we also support stable versions down to a specified Minimum Supported Rust Version (MSRV).

Minimum Supported Rust Version#

The MSRV is shown in the main Cargo.toml and as a readme badge:

Rust 1.XX

Our MSRV policy is to try to let our MSRV trail 2 stable versions behind the latest stable as a convenience to users downstream.

Best Effort Policy

Note that this policy, while sometimes more lenient than 2 versions, it is also not guaranteed to hold due to dependencies we have to upgrade. The version shown should be taken as best effort and descriptive, and it is verified as buildable by CI.

For maintainers: Bumping the MSRV#

Bumping the MSRV is done either as:

  • a response to a PR that brings in a dependency with a higher MSRV
  • an explicit choice to get new rust features

Performing the change requires developer tools, and is done by running just bump-msrv 1.60.0 to bump the all the Cargo.toml files:

-rust-version = "1.56.0"
+rust-version = "1.60.0"

as well as the badge plus devcontainer. If the bump is sufficient, CI will verify that the specified MSRV works with the current dependencies and feature usage before it can be merged.

NB: An MSRV change must have the changelog-change label so that it is sufficiently highlighted in our changelog.

For contributors: Nightly tooling#

Due to some limitations in stable rustdoc and rustfmt, we use the nightly toolchain for auto-formatting and documentation.

NB: This is contributor quirk only. All crates will always build with the stable toolchain.

CI always runs documentation and formatting builds against the latest nightly, but in general, the relevant features change very infrequently, so it's generally safe to rely on older nightly builds unless CI complains.

rustup update nightly