From c71d67010f95453b3006569f43b8fd23c1cf7275 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Tue, 14 Jan 2025 13:19:43 -0500 Subject: [PATCH] Fix Features when Depending on `wgpu` (#6915) --- Cargo.toml | 10 ++++++++-- benches/Cargo.toml | 2 +- examples/Cargo.toml | 8 ++------ tests/Cargo.toml | 2 +- wgpu-info/Cargo.toml | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 30e03a45f..e4f0d474b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,7 +80,7 @@ arrayvec = "0.7" bincode = "1" bit-vec = "0.8" bitflags = "2.7" -bytemuck = { version = "1.21" } +bytemuck = { version = "1.21", features = ["derive", "min_const_generics"] } cfg_aliases = "0.2.1" cfg-if = "1" criterion = "0.5" @@ -134,7 +134,13 @@ strum = { version = "0.26.0", features = ["derive"] } trybuild = "1" tracy-client = "0.17" thiserror = "2" -wgpu = { version = "23.0.1", path = "./wgpu", default-features = false } +wgpu = { version = "23.0.1", path = "./wgpu", default-features = false, features = [ + "serde", + "wgsl", + "dx12", + "metal", + "static-dxc", +] } wgpu-core = { version = "23.0.1", path = "./wgpu-core" } wgpu-macros = { version = "23.0.0", path = "./wgpu-macros" } wgpu-test = { version = "23.0.0", path = "./tests" } diff --git a/benches/Cargo.toml b/benches/Cargo.toml index d3e496650..d00cecf62 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -47,4 +47,4 @@ pollster.workspace = true profiling.workspace = true rayon.workspace = true tracy-client = { workspace = true, optional = true } -wgpu = { workspace = true, features = ["wgsl", "metal", "dx12"] } +wgpu.workspace = true diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 02fb524a1..1bef728f3 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -29,7 +29,7 @@ webgl = ["wgpu/webgl"] webgpu = ["wgpu/webgpu"] [dependencies] -bytemuck = { workspace = true, features = ["derive"] } +bytemuck.workspace = true cfg-if.workspace = true encase = { workspace = true, features = ["glam"] } flume.workspace = true @@ -43,11 +43,7 @@ obj.workspace = true png.workspace = true pollster.workspace = true web-time.workspace = true -wgpu = { workspace = true, default-features = false, features = [ - "wgsl", - "dx12", - "metal", -] } +wgpu.workspace = true winit.workspace = true [dev-dependencies] diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 410de588f..214aec9f0 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -45,7 +45,7 @@ serde_json.workspace = true serde.workspace = true strum = { workspace = true, features = ["derive"] } trybuild.workspace = true -wgpu = { workspace = true, features = ["wgsl", "static-dxc"] } +wgpu.workspace = true wgpu-macros.workspace = true wgt = { workspace = true, features = ["serde"] } diff --git a/wgpu-info/Cargo.toml b/wgpu-info/Cargo.toml index 39428e7be..8d05139ad 100644 --- a/wgpu-info/Cargo.toml +++ b/wgpu-info/Cargo.toml @@ -16,4 +16,4 @@ env_logger.workspace = true pico-args.workspace = true serde = { workspace = true, features = ["default"] } serde_json.workspace = true -wgpu = { workspace = true, features = ["serde", "dx12", "metal", "static-dxc"] } +wgpu.workspace = true