Skip to content

Commit

Permalink
don't build with serde unless serde is actually enabled
Browse files Browse the repository at this point in the history
TODO: we should test this on ci with cargo tree, it's too easy to sneak back in
  • Loading branch information
Wumpf committed Jan 25, 2025
1 parent f4e0d26 commit 0456cc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions wgpu-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ default = ["std"]
std = ["js-sys/std", "web-sys/std"]
strict_asserts = []
fragile-send-sync-non-atomic-wasm = []
serde = ["dep:serde"]
serde = ["dep:serde", "bitflags/serde"]
# Enables some internal instrumentation for debugging purposes.
counters = []

[dependencies]
bitflags = { workspace = true, features = ["serde"] }
bitflags.workspace = true
log.workspace = true
serde = { workspace = true, default-features = false, features = [
"alloc",
Expand Down
4 changes: 2 additions & 2 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ naga-ir = ["dep:naga"]
strict_asserts = ["wgpu-core?/strict_asserts", "wgpu-types/strict_asserts"]

## Enables serialization via `serde` on common wgpu types.
serde = ["dep:serde", "wgpu-core/serde"]
serde = ["dep:serde", "wgpu-core?/serde", "wgpu-types/serde"]

# Uncomment once we get to https://github.com/gfx-rs/wgpu/issues/5974
# ## Allow writing of trace capture files. See [`Adapter::request_device`].
Expand Down Expand Up @@ -144,7 +144,7 @@ naga = { workspace = true, optional = true }
wgpu-core = { workspace = true, optional = true, features = [
"raw-window-handle",
] }
wgpu-types = { workspace = true, features = ["serde"] }
wgpu-types = { workspace = true }
wgpu-hal = { workspace = true, optional = true, features = ["renderdoc"] }

arrayvec.workspace = true
Expand Down

0 comments on commit 0456cc6

Please sign in to comment.