Skip to content

Commit b5d7d94

Browse files
Use workspace dependencies more.
1 parent 2611d18 commit b5d7d94

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
# DX and GLES dependencies
164167
windows = { version = "0.58", default-features = false }
@@ -183,6 +186,9 @@ deno_webgpu = { version = "0.118.0", path = "./deno_webgpu" }
183186
tokio = "1.38.1"
184187
termcolor = "1.4.1"
185188

189+
# android dependencies
190+
ndk-sys = "0.5.0"
191+
186192
[patch."https://github.com/gfx-rs/naga"]
187193

188194
[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
@@ -110,20 +110,20 @@ name = "raw-gles"
110110
required-features = ["gles"]
111111

112112
[dependencies]
113-
bitflags = "2"
114-
parking_lot = ">=0.11, <0.13"
115-
profiling = { version = "1", default-features = false }
116-
raw-window-handle = "0.6"
117-
thiserror = "1"
118-
once_cell = "1.19.0"
113+
bitflags.workspace = true
114+
parking_lot.workspace = true
115+
profiling = { workspace = true, default-features = false }
116+
raw-window-handle.workspace = true
117+
thiserror.workspace = true
118+
once_cell.workspace = true
119119

120120
# backends common
121-
arrayvec = "0.7"
122-
rustc-hash = "1.1"
123-
log = "0.4"
121+
arrayvec.workspace = true
122+
rustc-hash.workspace = true
123+
log.workspace = true
124124

125125
# backend: Gles
126-
glow = { version = "0.14.0", optional = true }
126+
glow = { workspace = true, optional = true }
127127

128128
[dependencies.wgt]
129129
package = "wgpu-types"
@@ -132,33 +132,31 @@ version = "22.0.0"
132132

133133
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
134134
# backend: Vulkan
135-
ash = { version = "0.38.0", optional = true }
136-
gpu-alloc = { version = "0.6", optional = true }
137-
gpu-descriptor = { version = "0.3", optional = true }
138-
smallvec = { version = "1", optional = true, features = ["union"] }
135+
ash = { workspace = true, optional = true }
136+
gpu-alloc = { workspace = true, optional = true }
137+
gpu-descriptor = { workspace = true, optional = true }
138+
smallvec = { workspace = true, optional = true, features = ["union"] }
139139

140-
khronos-egl = { version = "6", features = ["dynamic"], optional = true }
141-
libloading = { version = ">=0.7, <0.9", optional = true }
142-
renderdoc-sys = { version = "1.1.0", optional = true }
140+
khronos-egl = { workspace = true, features = ["dynamic"], optional = true }
141+
libloading = { workspace = true, optional = true }
142+
renderdoc-sys = { workspace = true, optional = true }
143143

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

149149
[target.'cfg(windows)'.dependencies]
150150
# backend: Dx12 and Gles
151151
windows = { workspace = true, optional = true }
152152
# backend: Dx12
153-
bit-set = { version = "0.8", optional = true }
154-
range-alloc = { version = "0.1", optional = true }
155-
gpu-allocator = { version = "0.27", default-features = false, features = [
156-
"d3d12",
157-
"public-winapi",
158-
], optional = true }
159-
hassle-rs = { version = "0.11", optional = true }
153+
bit-set = { workspace = true, optional = true }
154+
range-alloc = { workspace = true, optional = true }
155+
gpu-allocator = { workspace = true, optional = true }
156+
hassle-rs = { workspace = true, optional = true }
157+
160158
# backend: Gles
161-
glutin_wgl_sys = { version = "0.6", optional = true }
159+
glutin_wgl_sys = { workspace = true, optional = true }
162160

163161
winapi = { version = "0.3", features = [
164162
"profileapi",
@@ -172,28 +170,28 @@ d3d12 = { path = "../d3d12/", version = "22.0.0", optional = true, features = [
172170

173171
[target.'cfg(any(target_os="macos", target_os="ios"))'.dependencies]
174172
# backend: Metal
175-
block = { version = "0.1", optional = true }
173+
block = { workspace = true, optional = true }
176174

177-
metal = { version = "0.29.0" }
178-
objc = "0.2.5"
179-
core-graphics-types = "0.1"
175+
metal.workspace = true
176+
objc.workspace = true
177+
core-graphics-types.workspace = true
180178

181179
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
182-
wasm-bindgen = "0.2.87"
183-
web-sys = { version = "0.3.69", features = [
180+
wasm-bindgen.workspace = true
181+
web-sys = { workspace = true, features = [
184182
"Window",
185183
"HtmlCanvasElement",
186184
"WebGl2RenderingContext",
187185
"OffscreenCanvas",
188186
] }
189-
js-sys = "0.3.69"
187+
js-sys.workspace = true
190188

191189
[target.'cfg(unix)'.dependencies]
192-
libc = "0.2"
190+
libc.workspace = true
193191

194192
[target.'cfg(target_os = "android")'.dependencies]
195-
android_system_properties = { version = "0.1.1", optional = true }
196-
ndk-sys = { version = "0.5.0", optional = true }
193+
android_system_properties = { workspace = true, optional = true }
194+
ndk-sys = { workspace = true, optional = true }
197195

198196
[dependencies.naga]
199197
path = "../naga"
@@ -209,12 +207,10 @@ version = "22.0.0"
209207
features = ["wgsl-in"]
210208

211209
[dev-dependencies]
212-
cfg-if = "1"
213-
env_logger = "0.11"
210+
cfg-if.workspace = true
211+
env_logger.workspace = true
214212
glam.workspace = true # for ray-traced-triangle example
215-
winit = { version = "0.29", features = [
216-
"android-native-activity",
217-
] } # for "halmark" example
213+
winit.workspace = true # for "halmark" example
218214

219215
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
220-
glutin = "0.29.1" # for "gles" example
216+
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)