mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-04-17 22:46:35 +00:00
Fix building wgpu
with --no-default-feautures
on web (wasm32-unknown-unknown
) (#6946)
* Fix wasm build without features * silence unused warnings if wgc & webgpu are disabled * add no-features check for web ci * add changelog entry # Conflicts: # CHANGELOG.md
This commit is contained in:
parent
fb3cb547fd
commit
0fcae47274
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -254,6 +254,9 @@ jobs:
|
||||
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --features glsl,spirv
|
||||
cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-deps --features glsl,spirv
|
||||
|
||||
# check with no features
|
||||
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-default-features
|
||||
|
||||
# all features
|
||||
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --all-features
|
||||
cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-deps --all-features
|
||||
|
@ -40,6 +40,13 @@ Bottom level categories:
|
||||
|
||||
## Unreleased
|
||||
|
||||
### v24.0.1 (2025-01-22)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* Fix `wgpu` not building with `--no-default-features` on when targeting `wasm32-unknown-unknown`. By @wumpf in [#6946](https://github.com/gfx-rs/wgpu/pull/6946).
|
||||
* Implement `Clone` on `ShaderModule`. By @a1phyr in [#6937](https://github.com/gfx-rs/wgpu/pull/6937).
|
||||
|
||||
## v24.0.0 (2025-01-15)
|
||||
|
||||
### Major changes
|
||||
|
@ -636,6 +636,8 @@ macro_rules! dispatch_types_inner {
|
||||
Self::Core(value) => value.as_ref(),
|
||||
#[cfg(webgpu)]
|
||||
Self::WebGPU(value) => value.as_ref(),
|
||||
#[cfg(not(any(wgpu_core, webgpu)))]
|
||||
_ => panic!("No context available. You need to enable one of wgpu's backend feature build flags."),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -765,6 +767,8 @@ macro_rules! dispatch_types_inner {
|
||||
Self::Core(value) => value,
|
||||
#[cfg(webgpu)]
|
||||
Self::WebGPU(value) => value,
|
||||
#[cfg(not(any(wgpu_core, webgpu)))]
|
||||
_ => panic!("No context available. You need to enable one of wgpu's backend feature build flags."),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -777,6 +781,8 @@ macro_rules! dispatch_types_inner {
|
||||
Self::Core(value) => value,
|
||||
#[cfg(webgpu)]
|
||||
Self::WebGPU(value) => value,
|
||||
#[cfg(not(any(wgpu_core, webgpu)))]
|
||||
_ => panic!("No context available. You need to enable one of wgpu's backend feature build flags."),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
unsafe_op_in_unsafe_fn
|
||||
)]
|
||||
#![allow(clippy::arc_with_non_send_sync)]
|
||||
#![cfg_attr(not(any(wgpu_core, webgpu)), allow(unused))]
|
||||
|
||||
//
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user