Enable wgpu default features in eframe / egui_wgpu default features (#7344)

This commit is contained in:
Lucas Meurer 2025-08-05 21:21:00 +02:00 committed by GitHub
parent ef039aa566
commit 2c6611d0c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 13 deletions

View File

@ -127,7 +127,7 @@ jobs:
components: rust-src
- name: Check wasm32+atomics eframe with wgpu
run: RUSTFLAGS='-C target-feature=+atomics' cargo +${{env.NIGHTLY_VERSION}} check -p eframe --lib --no-default-features --features wgpu --target wasm32-unknown-unknown -Z build-std=std,panic_abort
run: RUSTFLAGS='-C target-feature=+atomics' cargo +${{env.NIGHTLY_VERSION}} check -p eframe --lib --no-default-features --features wgpu,wgpu/webgpu --target wasm32-unknown-unknown -Z build-std=std,panic_abort
# ---------------------------------------------------------------------------

View File

@ -40,6 +40,9 @@ default = [
"winit/default",
"x11",
"egui-wgpu?/fragile-send-sync-non-atomic-wasm",
# Let's enable some backends so that users can use `eframe` out-of-the-box
# without having to explicitly opt-in to backends
"egui-wgpu?/default"
]
## Enable platform accessibility API implementations through [AccessKit](https://accesskit.dev/).
@ -167,12 +170,7 @@ glutin-winit = { workspace = true, optional = true, default-features = false, fe
"wgl",
] }
home = { workspace = true, optional = true }
wgpu = { workspace = true, optional = true, features = [
# Let's enable some backends so that users can use `eframe` out-of-the-box
# without having to explicitly opt-in to backends
"metal",
"webgpu",
] }
wgpu = { workspace = true, optional = true }
# mac:
[target.'cfg(any(target_os = "macos"))'.dependencies]
@ -268,11 +266,7 @@ web-sys = { workspace = true, features = [
# optional web:
egui-wgpu = { workspace = true, optional = true } # if wgpu is used, use it without (!) winit
wgpu = { workspace = true, optional = true, features = [
# Let's enable some backends so that users can use `eframe` out-of-the-box
# without having to explicitly opt-in to backends
"webgpu",
] }
wgpu = { workspace = true, optional = true }
# Native dev dependencies for testing
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]

View File

@ -31,7 +31,7 @@ all-features = true
rustdoc-args = ["--generate-link-to-definition"]
[features]
default = ["fragile-send-sync-non-atomic-wasm"]
default = ["fragile-send-sync-non-atomic-wasm", "wgpu/default"]
## Enable [`winit`](https://docs.rs/winit) integration. On Linux, requires either `wayland` or `x11`
winit = ["dep:winit", "winit/rwh_06"]