Skip to content

Commit

Permalink
Remove unnecessary Cargo.toml dependencies via cargo machete (#5692)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf authored May 12, 2024
1 parent fa48562 commit 452cf24
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 31 deletions.
10 changes: 0 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions deno_webgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ features = ["metal"]
workspace = true
features = ["dx12"]

[target.'cfg(windows)'.dependencies.wgpu-hal]
version = "0.20.0"
path = "../wgpu-hal"
features = ["windows_rs"]

# We want the wgpu-core Vulkan backend on Unix (but not Emscripten) and Windows.
[target.'cfg(any(windows, all(unix, not(target_os = "emscripten"))))'.dependencies.wgpu-core]
workspace = true
Expand Down
6 changes: 4 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ keywords.workspace = true
license.workspace = true
publish = false

[package.metadata.cargo-machete]
# Cargo machete struggles with this dev dependency:
ignored = ["wasm_bindgen_test"]

[lib]
path = "src/lib.rs"
harness = false
Expand Down Expand Up @@ -47,10 +51,8 @@ env_logger.workspace = true
console_error_panic_hook.workspace = true
console_log.workspace = true
fern.workspace = true
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
hal = { workspace = true, optional = true }
# We need these features in the framework examples and tests
web-sys = { workspace = true, features = [
"Location",
Expand Down
1 change: 0 additions & 1 deletion naga-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ test = false

[dependencies]
bincode = "1"
log = "0.4"
codespan-reporting = "0.11"
env_logger = "0.11"
argh = "0.1.5"
Expand Down
5 changes: 0 additions & 5 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ bytemuck.workspace = true
cfg-if.workspace = true
ctor.workspace = true
futures-lite.workspace = true
heck.workspace = true
libtest-mimic.workspace = true
log.workspace = true
parking_lot.workspace = true
Expand All @@ -47,13 +46,9 @@ parking_lot = { workspace = true, features = ["deadlock_detection"] }

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

[dev-dependencies]
naga = { workspace = true, features = ["wgsl-in"] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
image.workspace = true
js-sys.workspace = true
Expand Down
10 changes: 4 additions & 6 deletions wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ targets = [
"wasm32-unknown-unknown",
]

[package.metadata.cargo-machete]
# Cargo machete can't check build.rs dependencies. See https://github.com/bnjbvr/cargo-machete/issues/100
ignored = ["cfg_aliases"]

[lib]

[features]
Expand Down Expand Up @@ -129,11 +133,5 @@ path = "../wgpu-hal"
version = "0.20.0"
default_features = false

[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
web-sys = { version = "0.3.69", features = [
"HtmlCanvasElement",
"OffscreenCanvas",
] }

[build-dependencies]
cfg_aliases.workspace = true
4 changes: 4 additions & 0 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ targets = [
"wasm32-unknown-unknown",
]

[package.metadata.cargo-machete]
# Cargo machete can't check build.rs dependencies. See https://github.com/bnjbvr/cargo-machete/issues/100
ignored = ["cfg_aliases"]

[lib]

[features]
Expand Down
1 change: 0 additions & 1 deletion wgpu-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ pico-args.workspace = true
serde.workspace = true
serde_json.workspace = true
wgpu.workspace = true
wgpu-types = { workspace = true, features = ["serde"] }
6 changes: 5 additions & 1 deletion wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ targets = [
"wasm32-unknown-unknown",
]

[package.metadata.cargo-machete]
# Cargo machete can't check build.rs dependencies. See https://github.com/bnjbvr/cargo-machete/issues/100
ignored = ["cfg_aliases"]


[lib]

[features]
Expand Down Expand Up @@ -165,7 +170,6 @@ optional = true

[dependencies]
arrayvec.workspace = true
cfg-if.workspace = true
document-features.workspace = true
log.workspace = true
parking_lot.workspace = true
Expand Down

0 comments on commit 452cf24

Please sign in to comment.