Merge pull request #2068 from iced-rs/webgpu-by-default

Enable WebGPU backend in `wgpu` by default instead of WebGL
This commit is contained in:
Héctor Ramón 2023-09-04 04:04:01 +02:00 committed by GitHub
commit a56b25b909
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 3 deletions

View file

@ -25,6 +25,8 @@ jobs:
web:
runs-on: ubuntu-latest
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis
steps:
- uses: hecrj/setup-rust-action@v1
with:

View file

@ -39,6 +39,8 @@ palette = ["iced_core/palette"]
system = ["iced_winit/system"]
# Enables broken "sRGB linear" blending to reproduce color management of the Web
web-colors = ["iced_renderer/web-colors"]
# Enables the WebGL backend, replacing WebGPU
webgl = ["iced_renderer/webgl"]
# Enables the advanced module
advanced = []

View file

@ -17,6 +17,7 @@ svg = ["iced_tiny_skia/svg", "iced_wgpu?/svg"]
geometry = ["iced_graphics/geometry", "iced_tiny_skia/geometry", "iced_wgpu?/geometry"]
tracing = ["iced_wgpu?/tracing"]
web-colors = ["iced_wgpu?/web-colors"]
webgl = ["iced_wgpu?/webgl"]
[dependencies]
raw-window-handle = "0.5"

View file

@ -12,6 +12,7 @@ geometry = ["iced_graphics/geometry", "lyon"]
image = ["iced_graphics/image"]
svg = ["resvg"]
web-colors = ["iced_graphics/web-colors"]
webgl = ["wgpu/webgl"]
[dependencies]
wgpu = "0.17"
@ -24,9 +25,6 @@ once_cell = "1.0"
rustc-hash = "1.1"
log = "0.4"
[target.'cfg(target_arch = "wasm32")'.dependencies]
wgpu = { version = "0.17", features = ["webgl"] }
[dependencies.twox-hash]
version = "1.6"
default-features = false