Use target family insted of target arch (#2975)

* Replace cfg target_arch wasm32 with target_family wasm

* Fix warnings in test builds from previous pr
This commit is contained in:
Timon
2025-08-03 12:28:53 +02:00
committed by GitHub
parent 1e3c3da3fe
commit 67123f55dc
18 changed files with 106 additions and 96 deletions

View File

@@ -33,9 +33,9 @@ impl Context {
.request_device(&wgpu::DeviceDescriptor {
label: None,
// #[cfg(not(feature = "passthrough"))]
#[cfg(target_arch = "wasm32")]
#[cfg(target_family = "wasm")]
required_features: wgpu::Features::empty(),
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(target_family = "wasm"))]
required_features: wgpu::Features::PUSH_CONSTANTS,
// Currently disabled because not all backend support passthrough.
// TODO: reenable only when vulkan adapter is available