Skip to content

Commit

Permalink
wgpu-hal's MSRV is only 1.60. Explain MSRV rules in README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblandy committed Nov 23, 2022
1 parent 5d373cc commit fed5dc9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit fed5dc9

Please sign in to comment.