Skip to content

Commit 452cf24

Browse files
authored
Remove unnecessary Cargo.toml dependencies via cargo machete (#5692)
1 parent fa48562 commit 452cf24

File tree

9 files changed

+17
-31
lines changed

9 files changed

+17
-31
lines changed

Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno_webgpu/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ features = ["metal"]
4444
workspace = true
4545
features = ["dx12"]
4646

47-
[target.'cfg(windows)'.dependencies.wgpu-hal]
48-
version = "0.20.0"
49-
path = "../wgpu-hal"
50-
features = ["windows_rs"]
51-
5247
# We want the wgpu-core Vulkan backend on Unix (but not Emscripten) and Windows.
5348
[target.'cfg(any(windows, all(unix, not(target_os = "emscripten"))))'.dependencies.wgpu-core]
5449
workspace = true

examples/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ keywords.workspace = true
1010
license.workspace = true
1111
publish = false
1212

13+
[package.metadata.cargo-machete]
14+
# Cargo machete struggles with this dev dependency:
15+
ignored = ["wasm_bindgen_test"]
16+
1317
[lib]
1418
path = "src/lib.rs"
1519
harness = false
@@ -47,10 +51,8 @@ env_logger.workspace = true
4751
console_error_panic_hook.workspace = true
4852
console_log.workspace = true
4953
fern.workspace = true
50-
js-sys.workspace = true
5154
wasm-bindgen.workspace = true
5255
wasm-bindgen-futures.workspace = true
53-
hal = { workspace = true, optional = true }
5456
# We need these features in the framework examples and tests
5557
web-sys = { workspace = true, features = [
5658
"Location",

naga-cli/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ test = false
1919

2020
[dependencies]
2121
bincode = "1"
22-
log = "0.4"
2322
codespan-reporting = "0.11"
2423
env_logger = "0.11"
2524
argh = "0.1.5"

tests/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ bytemuck.workspace = true
2727
cfg-if.workspace = true
2828
ctor.workspace = true
2929
futures-lite.workspace = true
30-
heck.workspace = true
3130
libtest-mimic.workspace = true
3231
log.workspace = true
3332
parking_lot.workspace = true
@@ -47,13 +46,9 @@ parking_lot = { workspace = true, features = ["deadlock_detection"] }
4746

4847
[target.'cfg(target_arch = "wasm32")'.dependencies]
4948
console_log.workspace = true
50-
raw-window-handle.workspace = true
5149
wasm-bindgen.workspace = true
5250
web-sys = { workspace = true }
5351

54-
[dev-dependencies]
55-
naga = { workspace = true, features = ["wgsl-in"] }
56-
5752
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
5853
image.workspace = true
5954
js-sys.workspace = true

wgpu-core/Cargo.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ targets = [
2525
"wasm32-unknown-unknown",
2626
]
2727

28+
[package.metadata.cargo-machete]
29+
# Cargo machete can't check build.rs dependencies. See https://github.com/bnjbvr/cargo-machete/issues/100
30+
ignored = ["cfg_aliases"]
31+
2832
[lib]
2933

3034
[features]
@@ -129,11 +133,5 @@ path = "../wgpu-hal"
129133
version = "0.20.0"
130134
default_features = false
131135

132-
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
133-
web-sys = { version = "0.3.69", features = [
134-
"HtmlCanvasElement",
135-
"OffscreenCanvas",
136-
] }
137-
138136
[build-dependencies]
139137
cfg_aliases.workspace = true

wgpu-hal/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ targets = [
3030
"wasm32-unknown-unknown",
3131
]
3232

33+
[package.metadata.cargo-machete]
34+
# Cargo machete can't check build.rs dependencies. See https://github.com/bnjbvr/cargo-machete/issues/100
35+
ignored = ["cfg_aliases"]
36+
3337
[lib]
3438

3539
[features]

wgpu-info/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ pico-args.workspace = true
1717
serde.workspace = true
1818
serde_json.workspace = true
1919
wgpu.workspace = true
20-
wgpu-types = { workspace = true, features = ["serde"] }

wgpu/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ targets = [
2121
"wasm32-unknown-unknown",
2222
]
2323

24+
[package.metadata.cargo-machete]
25+
# Cargo machete can't check build.rs dependencies. See https://github.com/bnjbvr/cargo-machete/issues/100
26+
ignored = ["cfg_aliases"]
27+
28+
2429
[lib]
2530

2631
[features]
@@ -165,7 +170,6 @@ optional = true
165170

166171
[dependencies]
167172
arrayvec.workspace = true
168-
cfg-if.workspace = true
169173
document-features.workspace = true
170174
log.workspace = true
171175
parking_lot.workspace = true

0 commit comments

Comments
 (0)