Skip to content

Commit

Permalink
fix MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Sep 27, 2023
1 parent ed97465 commit ce970f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
RUST_LOG: info
RUST_BACKTRACE: full
MSRV: 1.65
DENO_MSRV: 1.70
PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work
RUSTFLAGS: --cfg=web_sys_unstable_apis -D warnings
RUSTDOCFLAGS: -Dwarnings
Expand Down Expand Up @@ -351,8 +352,8 @@ jobs:

- name: Install MSRV toolchain
run: |
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy
rustup default ${{ env.MSRV }}
rustup toolchain install ${{ env.DENO_MSRV }} --no-self-update --profile=minimal --component clippy
rustup default ${{ env.DENO_MSRV }}
- name: disable debug
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CARGO_INCREMENTAL: false
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
MSRV: 1.65
DENO_MSRV: 1.70

jobs:
cts:
Expand Down Expand Up @@ -51,8 +51,8 @@ jobs:
- name: Install MSRV toolchain
run: |
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }}
rustup default ${{ env.MSRV }}
rustup toolchain install ${{ env.DENO_MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }}
rustup default ${{ env.DENO_MSRV }}
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ For an overview of all the components in the gfx-rs ecosystem, see [the big pict
### MSRV policy

Minimum Supported Rust Version is **1.65**.
It is enforced on CI (in "/.github/workflows/ci.yml") with `RUST_VERSION` variable.
It is enforced on CI (in "/.github/workflows/ci.yml") with `MSRV` variable.
This version can only be upgraded in breaking releases.

The `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates should never
Expand All @@ -43,6 +43,10 @@ determined by the value of `MINIMUM_RUST_VERSION` in
vendor` to extract only those crates it actually uses, so the
workspace's other crates can have more recent MSRVs.

The `rust-toolchain` file's value is the `MSRV` required for `deno_webgpu`
and `cts_runner`, and not the Firefox MSRV, as these require newer MSRVs than
the rest of the codebase due to their dependencies on Deno.

_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,
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".

[toolchain]
channel = "1.70"
channel = "1.70" # Needed for deno & cts_runner. Firefox's MSRV is 1.65
components = ["rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]

0 comments on commit ce970f7

Please sign in to comment.