From 6d90a6683b8aaaf41c14d56bd1282b2b5fd9ea04 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sun, 15 May 2022 10:48:42 -0700 Subject: [PATCH] Accept both parking-lot 0.11 and 0.12.*, to avoid windows-rs. In parking_lot 0.12 and parking_lot_core 0.9.0, those crates switched from the winapi crate to the official Microsoft windows-sys crate. This is fine, except that windows-sys and its dependencies are even larger than winapi. Some users may wish to stick with winapi for the time being; this change allows wgpu to accommodate them. --- Cargo.lock | 78 ++++---------------------------------------- wgpu-core/Cargo.toml | 3 +- wgpu-hal/Cargo.toml | 3 +- wgpu/Cargo.toml | 6 ++-- 4 files changed, 14 insertions(+), 76 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c31e77b2ba..e93db0e6eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -691,7 +691,7 @@ dependencies = [ "log", "objc", "osmesa-sys", - "parking_lot 0.11.2", + "parking_lot", "wayland-client", "wayland-egl", "winapi", @@ -1235,17 +1235,7 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.5", -] - -[[package]] -name = "parking_lot" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.3", + "parking_lot_core", ] [[package]] @@ -1262,19 +1252,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "parking_lot_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "smallvec", - "windows-sys", -] - [[package]] name = "percent-encoding" version = "2.1.0" @@ -2093,7 +2070,7 @@ dependencies = [ "naga", "noise", "obj", - "parking_lot 0.12.0", + "parking_lot", "png", "pollster", "rand 0.7.3", @@ -2121,7 +2098,7 @@ dependencies = [ "fxhash", "log", "naga", - "parking_lot 0.12.0", + "parking_lot", "profiling", "raw-window-handle", "ron", @@ -2158,7 +2135,7 @@ dependencies = [ "metal", "naga", "objc", - "parking_lot 0.12.0", + "parking_lot", "profiling", "range-alloc", "raw-window-handle", @@ -2219,49 +2196,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "winit" version = "0.26.1" @@ -2283,7 +2217,7 @@ dependencies = [ "ndk-glue", "ndk-sys", "objc", - "parking_lot 0.11.2", + "parking_lot", "percent-encoding", "raw-window-handle", "smithay-client-toolkit", diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 24f99ec24d..e93995d2a4 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -30,7 +30,8 @@ codespan-reporting = "0.11" copyless = "0.1" fxhash = "0.2" log = "0.4" -parking_lot = "0.12" +# parking_lot 0.12 switches from `winapi` to `windows`; permit either +parking_lot = ">=0.11,<0.13" profiling = { version = "1", default-features = false } raw-window-handle = { version = "0.4", optional = true } ron = { version = "0.7", optional = true } diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index cfc5d9d3fe..9cc851d609 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -31,7 +31,8 @@ required-features = ["gles"] [dependencies] bitflags = "1.0" -parking_lot = "0.12" +# parking_lot 0.12 switches from `winapi` to `windows`; permit either +parking_lot = ">=0.11,<0.13" profiling = { version = "1", default-features = false } raw-window-handle = "0.4" thiserror = "1" diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 022c8573f6..d4f7b6e646 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -112,7 +112,8 @@ version = "0.12" [dependencies] arrayvec = "0.7" log = "0.4" -parking_lot = "0.12" +# parking_lot 0.12 switches from `winapi` to `windows`; permit either +parking_lot = ">=0.11,<0.13" raw-window-handle = "0.4" serde = { version = "1", features = ["derive"], optional = true } smallvec = "1" @@ -283,7 +284,8 @@ web-sys = { version = "0.3.53", features = [ ]} js-sys = "0.3.50" wasm-bindgen-futures = "0.4.23" -parking_lot = "0.12" +# parking_lot 0.12 switches from `winapi` to `windows`; permit either +parking_lot = ">=0.11,<0.13" [target.'cfg(target_arch = "wasm32")'.dev-dependencies] console_error_panic_hook = "0.1.6"