Remove unnecessary Cargo.toml dependencies via cargo machete (#5692)

This commit is contained in:
Andreas Reich 2024-05-13 01:05:00 +02:00 committed by GitHub
parent fa48562229
commit 452cf24fa1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 17 additions and 31 deletions

10
Cargo.lock generated
View File

@ -1086,7 +1086,6 @@ dependencies = [
"serde",
"tokio",
"wgpu-core",
"wgpu-hal",
"wgpu-types",
]
@ -2174,7 +2173,6 @@ dependencies = [
"bincode",
"codespan-reporting",
"env_logger",
"log",
"naga",
]
@ -4060,7 +4058,6 @@ name = "wgpu"
version = "0.20.0"
dependencies = [
"arrayvec 0.7.4",
"cfg-if",
"cfg_aliases",
"document-features",
"js-sys",
@ -4102,7 +4099,6 @@ dependencies = [
"serde",
"smallvec",
"thiserror",
"web-sys",
"wgpu-hal",
"wgpu-types",
]
@ -4121,7 +4117,6 @@ dependencies = [
"flume",
"getrandom",
"glam",
"js-sys",
"ktx2",
"log",
"nanorand",
@ -4135,7 +4130,6 @@ dependencies = [
"web-sys",
"web-time",
"wgpu",
"wgpu-hal",
"wgpu-test",
"winit 0.29.15",
]
@ -4199,7 +4193,6 @@ dependencies = [
"serde",
"serde_json",
"wgpu",
"wgpu-types",
]
[[package]]
@ -4224,18 +4217,15 @@ dependencies = [
"ctor",
"env_logger",
"futures-lite",
"heck 0.5.0",
"image",
"js-sys",
"libtest-mimic",
"log",
"naga",
"nv-flip",
"parking_lot",
"png",
"pollster",
"profiling",
"raw-window-handle 0.6.1",
"serde",
"serde_json",
"wasm-bindgen",

View File

@ -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

View File

@ -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
@ -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",

View File

@ -19,7 +19,6 @@ test = false
[dependencies]
bincode = "1"
log = "0.4"
codespan-reporting = "0.11"
env_logger = "0.11"
argh = "0.1.5"

View File

@ -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
@ -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

View File

@ -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]
@ -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

View File

@ -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]

View File

@ -17,4 +17,3 @@ pico-args.workspace = true
serde.workspace = true
serde_json.workspace = true
wgpu.workspace = true
wgpu-types = { workspace = true, features = ["serde"] }

View File

@ -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]
@ -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