diff --git a/README.md b/README.md index 48590872ac..02aabc8258 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,23 @@ Minimum Supported Rust Version is **1.64**. It is enforced on CI (in "/.github/workflows/ci.yml") with `RUST_VERSION` variable. This version can only be upgraded in breaking releases. +The `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates should never +require an MSRV ahead of Firefox's MSRV for nightly builds, as +determined by the value of `MINIMUM_RUST_VERSION` in +[`python/mozboot/mozboot/util.py`][util]. However, Firefox uses `cargo +vendor` to extract only those crates it actually uses, so the +workspace's other crates can have more recent MSRVs. + +*Note for Rust 1.64*: The workspace itself can even use a newer MSRV +than Firefox, as long as the vendoring step's `Cargo.toml` rewriting +removes any features Firefox's MSRV couldn't handle. For example, +`wgpu` can use manifest key inheritance, added in Rust 1.64, even +before Firefox reaches that MSRV, because `cargo vendor` copies +inherited values directly into the individual crates' `Cargo.toml` +files, producing 1.63-compatible files. + +[util]: https://searchfox.org/mozilla-central/source/python/mozboot/mozboot/util.py + ## Getting Started ### Rust diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 79c5832219..aa8bbcada9 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -8,7 +8,12 @@ homepage.workspace = true repository.workspace = true keywords.workspace = true license.workspace = true -rust-version.workspace = true + +# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to +# copy the crates it actually uses out of the workspace, so it's meaningful for +# them to have less restrictive MSRVs individually than the workspace as a +# whole, if their code permits. See `../README.md` for details. +rust-version = "1.60" [package.metadata.docs.rs] # Ideally we would enable all the features.