Skip to content

Commit 05c420f

Browse files
Use workspace dependencies more.
1 parent 65b6e15 commit 05c420f

File tree

6 files changed

+82
-81
lines changed

6 files changed

+82
-81
lines changed

Cargo.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ version = "22.0.0"
7171

7272
[workspace.dependencies]
7373
anyhow = "1.0.86"
74+
argh = "0.1.5"
7475
arrayvec = "0.7"
7576
bincode = "1"
7677
bit-vec = "0.8"
77-
bitflags = "2"
78+
bitflags = "2.6"
7879
bytemuck = { version = "1.16", features = ["derive"] }
7980
cfg_aliases = "0.1"
8081
cfg-if = "1"
@@ -91,6 +92,7 @@ getrandom = "0.2"
9192
glam = "0.28"
9293
heck = "0.5.0"
9394
image = { version = "0.24", default-features = false, features = ["png"] }
95+
indexmap = "2"
9496
itertools = { version = "0.10.5" }
9597
ktx2 = "0.3"
9698
libc = "0.2"
@@ -103,7 +105,7 @@ nanorand = { version = "0.7", default-features = false, features = ["wyrand"] }
103105
noise = { version = "0.8", git = "https://github.com/Razaekel/noise-rs.git", rev = "c6942d4fb70af26db4441edcf41f90fa115333f2" }
104106
nv-flip = "0.1"
105107
obj = "0.10"
106-
once_cell = "1"
108+
once_cell = "1.19.0"
107109
parking_lot = ">=0.11, <0.13" # parking_lot 0.12 switches from `winapi` to `windows`; permit either
108110
pico-args = { version = "0.5.0", features = [
109111
"eq-separator",
@@ -124,7 +126,7 @@ smallvec = "1"
124126
static_assertions = "1.1.0"
125127
strum = { version = "0.25.0", features = ["derive"] }
126128
tracy-client = "0.17"
127-
thiserror = "1"
129+
thiserror = "1.0.63"
128130
wgpu = { version = "22.0.0", path = "./wgpu", default-features = false }
129131
wgpu-core = { version = "22.0.0", path = "./wgpu-core" }
130132
wgpu-macros = { version = "22.0.0", path = "./wgpu-macros" }
@@ -146,7 +148,7 @@ gpu-descriptor = "0.3"
146148

147149
# DX dependencies
148150
bit-set = "0.8"
149-
gpu-allocator = { version = "0.26", default-features = false, features = [
151+
gpu-allocator = { version = "0.27", default-features = false, features = [
150152
"d3d12",
151153
"public-winapi",
152154
] }
@@ -159,6 +161,7 @@ hassle-rs = "0.11.0"
159161
khronos-egl = "6"
160162
glow = "0.14.0"
161163
glutin = "0.29.1"
164+
glutin_wgl_sys = "0.6"
162165

163166
# wasm32 dependencies
164167
console_error_panic_hook = "0.1.7"
@@ -180,6 +183,9 @@ deno_webgpu = { version = "0.118.0", path = "./deno_webgpu" }
180183
tokio = "1.38.1"
181184
termcolor = "1.4.1"
182185

186+
# android dependencies
187+
ndk-sys = "0.5.0"
188+
183189
[patch."https://github.com/gfx-rs/naga"]
184190

185191
[patch."https://github.com/zakarumych/gpu-descriptor"]

naga-cli/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ doc = false
1818
test = false
1919

2020
[dependencies]
21-
bincode = "1"
22-
codespan-reporting = "0.11"
23-
env_logger = "0.11"
24-
argh = "0.1.5"
21+
bincode.workspace = true
22+
codespan-reporting.workspace = true
23+
env_logger.workspace = true
24+
argh.workspace = true
2525
anyhow.workspace = true
2626

2727
[dependencies.naga]

naga/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,31 +59,31 @@ compact = []
5959

6060
[dependencies]
6161
arbitrary = { version = "1.3", features = ["derive"], optional = true }
62-
bitflags = "2.6"
63-
bit-set = "0.8"
62+
arrayvec.workspace = true
63+
bitflags.workspace = true
64+
bit-set.workspace = true
6465
termcolor = { version = "1.4.1" }
6566
# remove termcolor dep when updating to the next version of codespan-reporting
6667
# termcolor minimum version was wrong and was fixed in
6768
# https://github.com/brendanzab/codespan/commit/e99c867339a877731437e7ee6a903a3d03b5439e
6869
codespan-reporting = { version = "0.11.0" }
69-
rustc-hash = "1.1.0"
70-
indexmap = "2"
70+
rustc-hash.workspace = true
71+
indexmap.workspace = true
7172
log = "0.4"
7273
spirv = { version = "0.3", optional = true }
73-
thiserror = "1.0.63"
74+
thiserror.workspace = true
7475
serde = { version = "1.0.204", features = ["derive"], optional = true }
7576
petgraph = { version = "0.6", optional = true }
7677
pp-rs = { version = "0.2.1", optional = true }
7778
hexf-parse = { version = "0.2.1", optional = true }
7879
unicode-xid = { version = "0.2.3", optional = true }
79-
arrayvec.workspace = true
8080

8181
[build-dependencies]
8282
cfg_aliases.workspace = true
8383

8484
[dev-dependencies]
8585
diff = "0.1"
86-
env_logger = "0.11"
86+
env_logger.workspace = true
8787
# This _cannot_ have a version specified. If it does, crates.io will look
8888
# for a version of the package on crates when we publish naga. Path dependencies
8989
# are allowed through though.
@@ -93,5 +93,5 @@ hlsl-snapshots = { path = "./hlsl-snapshots" }
9393
# incompatible with our tests because we do a syntactic diff and not a semantic one.
9494
ron = "0.8.0"
9595
rspirv = { version = "0.11", git = "https://github.com/gfx-rs/rspirv", rev = "b969f175d5663258b4891e44b76c1544da9661ab" }
96-
serde = { version = "1.0", features = ["derive"] }
96+
serde = { workspace = true, features = ["derive"] }
9797
spirv = { version = "0.3", features = ["deserialize"] }

wgpu-core/Cargo.toml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,22 @@ gles = ["hal/gles"]
103103
dx12 = ["hal/dx12"]
104104

105105
[dependencies]
106-
arrayvec = "0.7"
107-
bit-vec = "0.8"
108-
bitflags = "2"
109-
bytemuck = { version = "1.16", optional = true }
106+
arrayvec.workspace = true
107+
bit-vec.workspace = true
108+
bitflags.workspace = true
109+
bytemuck = { workspace = true, optional = true }
110110
document-features.workspace = true
111-
indexmap = "2"
112-
log = "0.4"
113-
once_cell = "1"
114-
# parking_lot 0.12 switches from `winapi` to `windows`; permit either
115-
parking_lot = ">=0.11, <0.13"
116-
profiling = { version = "1", default-features = false }
117-
raw-window-handle = { version = "0.6", optional = true }
118-
ron = { version = "0.8", optional = true }
119-
rustc-hash = "1.1"
120-
serde = { version = "1", features = ["derive"], optional = true }
121-
smallvec = "1"
122-
thiserror = "1"
111+
indexmap.workspace = true
112+
log.workspace = true
113+
once_cell.workspace = true
114+
parking_lot.workspace = true
115+
profiling = { workspace = true, default-features = false }
116+
raw-window-handle = { workspace = true, optional = true }
117+
ron = { workspace = true, optional = true }
118+
rustc-hash.workspace = true
119+
serde = { workspace = true, features = ["derive"], optional = true }
120+
smallvec.workspace = true
121+
thiserror.workspace = true
123122

124123
[dependencies.naga]
125124
path = "../naga"

wgpu-hal/Cargo.toml

Lines changed: 39 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,20 @@ name = "raw-gles"
107107
required-features = ["gles"]
108108

109109
[dependencies]
110-
bitflags = "2"
111-
parking_lot = ">=0.11, <0.13"
112-
profiling = { version = "1", default-features = false }
113-
raw-window-handle = "0.6"
114-
thiserror = "1"
115-
once_cell = "1.19.0"
110+
bitflags.workspace = true
111+
parking_lot.workspace = true
112+
profiling = { workspace = true, default-features = false }
113+
raw-window-handle.workspace = true
114+
thiserror.workspace = true
115+
once_cell.workspace = true
116116

117117
# backends common
118-
arrayvec = "0.7"
119-
rustc-hash = "1.1"
120-
log = "0.4"
118+
arrayvec.workspace = true
119+
rustc-hash.workspace = true
120+
log.workspace = true
121121

122122
# backend: Gles
123-
glow = { version = "0.14.0", optional = true }
123+
glow = { workspace = true, optional = true }
124124

125125
[dependencies.wgt]
126126
package = "wgpu-types"
@@ -129,31 +129,29 @@ version = "22.0.0"
129129

130130
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
131131
# backend: Vulkan
132-
ash = { version = "0.38.0", optional = true }
133-
gpu-alloc = { version = "0.6", optional = true }
134-
gpu-descriptor = { version = "0.3", optional = true }
135-
smallvec = { version = "1", optional = true, features = ["union"] }
132+
ash = { workspace = true, optional = true }
133+
gpu-alloc = { workspace = true, optional = true }
134+
gpu-descriptor = { workspace = true, optional = true }
135+
smallvec = { workspace = true, optional = true, features = ["union"] }
136136

137-
khronos-egl = { version = "6", features = ["dynamic"], optional = true }
138-
libloading = { version = ">=0.7, <0.9", optional = true }
139-
renderdoc-sys = { version = "1.1.0", optional = true }
137+
khronos-egl = { workspace = true, features = ["dynamic"], optional = true }
138+
libloading = { workspace = true, optional = true }
139+
renderdoc-sys = { workspace = true, optional = true }
140140

141141
[target.'cfg(target_os = "emscripten")'.dependencies]
142-
khronos-egl = { version = "6", features = ["static", "no-pkg-config"] }
142+
khronos-egl = { workspace = true, features = ["static", "no-pkg-config"] }
143143
#Note: it's unused by emscripten, but we keep it to have single code base in egl.rs
144-
libloading = { version = ">=0.7, <0.9", optional = true }
144+
libloading = { workspace = true, optional = true }
145145

146146
[target.'cfg(windows)'.dependencies]
147147
# backend: Dx12
148-
bit-set = { version = "0.8", optional = true }
149-
range-alloc = { version = "0.1", optional = true }
150-
gpu-allocator = { version = "0.27", default-features = false, features = [
151-
"d3d12",
152-
"public-winapi",
153-
], optional = true }
154-
hassle-rs = { version = "0.11", optional = true }
148+
bit-set = { workspace = true, optional = true }
149+
range-alloc = { workspace = true, optional = true }
150+
gpu-allocator = { workspace = true, optional = true }
151+
hassle-rs = { workspace = true, optional = true }
152+
155153
# backend: Gles
156-
glutin_wgl_sys = { version = "0.6", optional = true }
154+
glutin_wgl_sys = { workspace = true, optional = true }
157155

158156
winapi = { version = "0.3", features = [
159157
"profileapi",
@@ -167,28 +165,28 @@ d3d12 = { path = "../d3d12/", version = "22.0.0", optional = true, features = [
167165

168166
[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
169167
# backend: Metal
170-
block = { version = "0.1", optional = true }
168+
block = { workspace = true, optional = true }
171169

172-
metal = { version = "0.29.0" }
173-
objc = "0.2.5"
174-
core-graphics-types = "0.1"
170+
metal.workspace = true
171+
objc.workspace = true
172+
core-graphics-types.workspace = true
175173

176174
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
177-
wasm-bindgen = "0.2.87"
178-
web-sys = { version = "0.3.69", features = [
175+
wasm-bindgen.workspace = true
176+
web-sys = { workspace = true, features = [
179177
"Window",
180178
"HtmlCanvasElement",
181179
"WebGl2RenderingContext",
182180
"OffscreenCanvas",
183181
] }
184-
js-sys = "0.3.69"
182+
js-sys.workspace = true
185183

186184
[target.'cfg(unix)'.dependencies]
187-
libc = "0.2"
185+
libc.workspace = true
188186

189187
[target.'cfg(target_os = "android")'.dependencies]
190-
android_system_properties = { version = "0.1.1", optional = true }
191-
ndk-sys = { version = "0.5.0", optional = true }
188+
android_system_properties = { workspace = true, optional = true }
189+
ndk-sys = { workspace = true, optional = true }
192190

193191
[dependencies.naga]
194192
path = "../naga"
@@ -204,12 +202,10 @@ version = "22.0.0"
204202
features = ["wgsl-in"]
205203

206204
[dev-dependencies]
207-
cfg-if = "1"
208-
env_logger = "0.11"
205+
cfg-if.workspace = true
206+
env_logger.workspace = true
209207
glam.workspace = true # for ray-traced-triangle example
210-
winit = { version = "0.29", features = [
211-
"android-native-activity",
212-
] } # for "halmark" example
208+
winit.workspace = true # for "halmark" example
213209

214210
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
215-
glutin = "0.29.1" # for "gles" example
211+
glutin.workspace = true # for "gles" example

wgpu-types/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ serde = ["dep:serde"]
3535
counters = []
3636

3737
[dependencies]
38-
bitflags = "2"
39-
serde = { version = "1", features = ["derive"], optional = true }
38+
bitflags.workspace = true
39+
serde = { workspace = true, features = ["derive"], optional = true }
4040

4141
[target.'cfg(target_arch = "wasm32")'.dependencies]
42-
js-sys = "0.3.69"
43-
web-sys = { version = "0.3.69", features = [
42+
js-sys.workspace = true
43+
web-sys = { workspace = true, features = [
4444
"ImageBitmap",
4545
"HtmlVideoElement",
4646
"HtmlCanvasElement",
4747
"OffscreenCanvas",
4848
] }
4949

5050
[dev-dependencies]
51-
serde = { version = "1", features = ["derive"] }
52-
serde_json = "1.0.120"
51+
serde = { workspace = true, features = ["derive"] }
52+
serde_json.workspace = true

0 commit comments

Comments
 (0)