Skip to content

Commit 84f9432

Browse files
committed
Move REPO_MSRV to 1.85
1 parent 031ed26 commit 84f9432

File tree

18 files changed

+49
-48
lines changed

18 files changed

+49
-48
lines changed

.github/workflows/ci.yml

+3-14
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ env:
3636
CI_BINARY_BUILD: "build20"
3737

3838
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
39-
REPO_MSRV: "1.83"
39+
REPO_MSRV: "1.85"
4040
# This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates,
4141
# to ensure that they can be used with firefox.
4242
CORE_MSRV: "1.76"
@@ -164,20 +164,9 @@ jobs:
164164
tier: 2
165165
kind: wgpu-only
166166

167-
# TODO: Uncomment once web-sys updates past 0.3.76
168-
# See https://github.com/rustwasm/wasm-bindgen/pull/4378 for details
169-
# - name: WebAssembly Core 1.0
170-
# os: ubuntu-22.04
171-
# target: wasm32v1-none
172-
# tier: 2
173-
# kind: no_std
174-
175-
# Bare-metal x86-64
176-
# TODO: Remove once web-sys updates past 0.3.76
177-
# Included while wasm32v1-none is failing to ensure `no_std` does not regress
178-
- name: no_std x86_64
167+
- name: WebAssembly Core 1.0
179168
os: ubuntu-22.04
180-
target: x86_64-unknown-none
169+
target: wasm32v1-none
181170
tier: 2
182171
kind: no_std
183172

.github/workflows/docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ name: Docs
33
on:
44
pull_request:
55
paths:
6-
- '.github/workflows/docs.yml'
6+
- ".github/workflows/docs.yml"
77
push:
88
branches:
99
- trunk
1010

1111
env:
1212
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
13-
REPO_MSRV: "1.83"
13+
REPO_MSRV: "1.85"
1414

1515
CARGO_INCREMENTAL: false
1616
CARGO_TERM_COLOR: always

.github/workflows/generate.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
#
1414

1515
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
16-
REPO_MSRV: "1.83"
16+
REPO_MSRV: "1.85"
1717
RUSTFLAGS: -D warnings
1818

1919
jobs:
@@ -36,10 +36,11 @@ jobs:
3636
steps:
3737
- uses: actions/checkout@v4
3838

39+
# We can't rely on an override here, as that would only set
40+
# the toolchain for the current directory, not the newly generated project.
3941
- name: Install repo MSRV toolchain
4042
run: |
4143
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal
42-
rustup override set ${{ env.REPO_MSRV }}
4344
cargo -V
4445
4546
- name: Disable debug symbols
@@ -74,4 +75,4 @@ jobs:
7475
[patch.crates-io]
7576
wgpu = { path = "../wgpu/wgpu" }
7677
EOF
77-
cargo check
78+
cargo +${{ env.REPO_MSRV }} check

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ref_as_ptr = "warn"
5151

5252
[workspace.package]
5353
edition = "2021"
54-
rust-version = "1.83"
54+
rust-version = "1.85"
5555
keywords = ["graphics"]
5656
license = "MIT OR Apache-2.0"
5757
homepage = "https://wgpu.rs/"

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ On Linux, you can point to them using `LD_LIBRARY_PATH` environment.
148148

149149
Due to complex dependants, we have two MSRV policies:
150150

151-
- `naga`, `wgpu-core`, `wgpu-hal`, and `wgpu-types`'s MSRV is **1.76**, but may be lower than the rest of the workspace in the future.
152-
- The rest of the workspace has an MSRV of **1.83** as well right now, but may be higher than above listed crates.
151+
- `naga`, `wgpu-core`, `wgpu-hal`, and `wgpu-types`'s MSRV is **1.76**.
152+
- The rest of the workspace has an MSRV of **1.85**.
153153

154154
It is enforced on CI (in "/.github/workflows/ci.yml") with the `CORE_MSRV` and `REPO_MSRV` variables.
155155
This version can only be upgraded in breaking releases, though we release a breaking version every three months.

examples/standalone/01_hello_compute/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "wgpu-example-01-hello-compute"
33
edition = "2021"
4-
rust-version = "1.83"
4+
rust-version = "1.85"
55
publish = false
66

77
[dependencies]

examples/standalone/02_hello_window/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "wgpu-example-02-hello-window"
33
edition = "2021"
4-
rust-version = "1.83"
4+
rust-version = "1.85"
55
publish = false
66

77
[dependencies]

naga/src/back/spv/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl Instruction {
108108
}
109109

110110
pub(super) fn to_words(&self, sink: &mut impl Extend<Word>) {
111-
sink.extend(Some(self.wc << 16 | self.op as u32));
111+
sink.extend(Some((self.wc << 16) | self.op as u32));
112112
sink.extend(self.type_id);
113113
sink.extend(self.result_id);
114114
sink.extend(self.operands.iter().cloned());

naga/src/front/spv/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5572,7 +5572,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
55725572
8 => {
55735573
inst.expect(5)?;
55745574
let high = self.next()?;
5575-
crate::Literal::U64(u64::from(high) << 32 | u64::from(low))
5575+
crate::Literal::U64((u64::from(high) << 32) | u64::from(low))
55765576
}
55775577
_ => return Err(Error::InvalidTypeWidth(width as u32)),
55785578
}
@@ -5587,7 +5587,7 @@ impl<I: Iterator<Item = u32>> Frontend<I> {
55875587
8 => {
55885588
inst.expect(5)?;
55895589
let high = self.next()?;
5590-
crate::Literal::I64((u64::from(high) << 32 | u64::from(low)) as i64)
5590+
crate::Literal::I64(((u64::from(high) << 32) | u64::from(low)) as i64)
55915591
}
55925592
_ => return Err(Error::InvalidTypeWidth(width as u32)),
55935593
}

naga/xtask/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "xtask"
33
version = "0.1.0"
44
edition = "2021"
55
publish = false
6-
rust-version = "1.83"
6+
rust-version = "1.85"
77

88
[dependencies]
99
anyhow = "1"

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.83"
2+
channel = "1.85"
33
components = ["rustfmt", "clippy"]
44
targets = ["wasm32-unknown-unknown"]

tests/src/expectations.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,12 @@ impl FailureCase {
250250
/// Returns true if the given failure "satisfies" this failure case.
251251
pub(crate) fn matches_failure(&self, failure: &FailureResult) -> bool {
252252
for reason in self.reasons() {
253-
let kind_matched = reason.kind.map_or(true, |kind| kind == failure.kind);
253+
let kind_matched = reason.kind.is_none_or(|kind| kind == failure.kind);
254254

255255
let message_matched =
256256
reason
257257
.message
258-
.map_or(true, |message| matches!(&failure.message, Some(actual) if actual.to_lowercase().contains(&message.to_lowercase())));
258+
.is_none_or(|message| matches!(&failure.message, Some(actual) if actual.to_lowercase().contains(&message.to_lowercase())));
259259

260260
if kind_matched && message_matched {
261261
let message = failure.message.as_deref().unwrap_or("*no message*");

wgpu-core/src/command/ray_tracing.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,7 @@ impl Global {
261261
Some(size) => size,
262262
};
263263

264-
let scratch_buffer =
265-
ScratchBuffer::new(device, scratch_size).map_err(crate::device::DeviceError::from)?;
264+
let scratch_buffer = ScratchBuffer::new(device, scratch_size)?;
266265

267266
let scratch_buffer_barrier = hal::BufferBarrier::<dyn hal::DynBuffer> {
268267
buffer: scratch_buffer.raw(),
@@ -583,8 +582,7 @@ impl Global {
583582
Some(size) => size,
584583
};
585584

586-
let scratch_buffer =
587-
ScratchBuffer::new(device, scratch_size).map_err(crate::device::DeviceError::from)?;
585+
let scratch_buffer = ScratchBuffer::new(device, scratch_size)?;
588586

589587
let scratch_buffer_barrier = hal::BufferBarrier::<dyn hal::DynBuffer> {
590588
buffer: scratch_buffer.raw(),
@@ -645,8 +643,7 @@ impl Global {
645643
let mut staging_buffer = StagingBuffer::new(
646644
device,
647645
wgt::BufferSize::new(instance_buffer_staging_source.len() as u64).unwrap(),
648-
)
649-
.map_err(crate::device::DeviceError::from)?;
646+
)?;
650647
staging_buffer.write(&instance_buffer_staging_source);
651648
let flushed = staging_buffer.flush();
652649
Some(flushed)

wgpu-hal/Cargo.toml

+11-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ targets = [
3535
ignored = ["cfg_aliases"]
3636

3737
[lints.rust]
38-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(web_sys_unstable_apis)'] }
38+
unexpected_cfgs = { level = "warn", check-cfg = [
39+
'cfg(web_sys_unstable_apis)', # web-sys uses this
40+
] }
3941

4042
[lib]
4143

@@ -173,6 +175,14 @@ device_lost_panic = []
173175
# Only affects the d3d12 and vulkan backends.
174176
internal_error_panic = []
175177

178+
###################
179+
### Workarounds ###
180+
###################
181+
182+
# objc's `msg_send` macro injects this in our code https://github.com/SSheldon/rust-objc/issues/125
183+
# You shouldn't ever enable this feature.
184+
cargo-clippy = []
185+
176186
[[example]]
177187
name = "halmark"
178188

wgpu-hal/src/dx12/device.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,11 @@ impl crate::Device for super::Device {
677677
None => Direct3D12::D3D12_FILTER_REDUCTION_TYPE_STANDARD,
678678
};
679679
let mut filter = Direct3D12::D3D12_FILTER(
680-
conv::map_filter_mode(desc.min_filter).0 << Direct3D12::D3D12_MIN_FILTER_SHIFT
681-
| conv::map_filter_mode(desc.mag_filter).0 << Direct3D12::D3D12_MAG_FILTER_SHIFT
682-
| conv::map_filter_mode(desc.mipmap_filter).0 << Direct3D12::D3D12_MIP_FILTER_SHIFT
683-
| reduction.0 << Direct3D12::D3D12_FILTER_REDUCTION_TYPE_SHIFT,
680+
(conv::map_filter_mode(desc.min_filter).0 << Direct3D12::D3D12_MIN_FILTER_SHIFT)
681+
| (conv::map_filter_mode(desc.mag_filter).0 << Direct3D12::D3D12_MAG_FILTER_SHIFT)
682+
| (conv::map_filter_mode(desc.mipmap_filter).0
683+
<< Direct3D12::D3D12_MIP_FILTER_SHIFT)
684+
| (reduction.0 << Direct3D12::D3D12_FILTER_REDUCTION_TYPE_SHIFT),
684685
);
685686

686687
if desc.anisotropy_clamp != 1 {

wgpu-hal/src/vulkan/device.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -2064,10 +2064,7 @@ impl crate::Device for super::Device {
20642064
let vk_dynamic_state =
20652065
vk::PipelineDynamicStateCreateInfo::default().dynamic_states(&dynamic_states);
20662066

2067-
let raw_pass = self
2068-
.shared
2069-
.make_render_pass(compatible_rp_key)
2070-
.map_err(crate::DeviceError::from)?;
2067+
let raw_pass = self.shared.make_render_pass(compatible_rp_key)?;
20712068

20722069
let vk_infos = [{
20732070
vk::GraphicsPipelineCreateInfo::default()

wgpu/src/api/buffer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ fn check_buffer_bounds(
803803
if let Some(size) = size {
804804
// Detect integer overflow.
805805
let end = offset.checked_add(size.get());
806-
if end.map_or(true, |end| end > buffer_size) {
806+
if end.is_none_or(|end| end > buffer_size) {
807807
panic!(
808808
"slice offset {} size {} is out of range for buffer of size {}",
809809
offset, size, buffer_size

xtask/Cargo.toml

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
name = "xtask"
33
version = "0.1.0"
44
edition = "2021"
5-
rust-version = "1.83"
5+
rust-version = "1.85"
66
publish = false
77

8+
[lints.rust]
9+
unexpected_cfgs = { level = "warn", check-cfg = [
10+
# Added by xshell
11+
'cfg(trick_rust_analyzer_into_highlighting_interpolated_bits)',
12+
] }
13+
814
[dependencies]
915
# The dependencies in this config have no transitive dependencies.
1016
anyhow = "1.0.71"

0 commit comments

Comments
 (0)