Skip to content

Commit 7c4fe4a

Browse files
author
Pat Hickey
committed
convert more dependencies to { workspace = true }
Alex asked me to do thsi for wit-component and wit-bindgen, and I found a few more (cfg-if, tempfile, filecheck, anyhow... I also reorganized the workspace dependencies section to make the ones our team maintains more clearly separated from our external dependencies.
1 parent 4745cab commit 7c4fe4a

12 files changed

Lines changed: 43 additions & 26 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ rustix = { workspace = true, features = ["mm", "param"] }
5454
wasmtime = { workspace = true, features = ['component-model', 'async', 'default', 'winch'] }
5555
env_logger = { workspace = true }
5656
log = { workspace = true }
57-
filecheck = "0.5.0"
58-
tempfile = "3.1.0"
57+
filecheck = { workspace = true }
58+
tempfile = { workspace = true }
5959
test-programs = { path = "crates/test-programs" }
6060
wasmtime-runtime = { workspace = true }
6161
tokio = { version = "1.8.0", features = ["rt", "time", "macros", "rt-multi-thread"] }
@@ -181,8 +181,24 @@ winch-test-macros = { path = "winch/test-macros" }
181181
wasi-preview1-component-adapter = { path = "crates/wasi-preview1-component-adapter" }
182182
byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-array-literals" }
183183

184+
# Bytecode Alliance maintained dependencies:
185+
# ---------------------------
186+
regalloc2 = "0.8.1"
187+
188+
# cap-std family:
184189
target-lexicon = { version = "0.12.3", default-features = false, features = ["std"] }
185-
anyhow = "1.0.22"
190+
cap-std = "1.0.0"
191+
cap-rand = "1.0.0"
192+
io-lifetimes = { version = "1.0.0", default-features = false }
193+
rustix = "0.37.13"
194+
195+
# wit-bindgen:
196+
wit-bindgen = "0.6.0"
197+
198+
# FIXME: the above wit-bindgen depends on versions ahead of the wasm-tools
199+
# dependencies below. When the below are updated, remove the exception
200+
# for duplicate wasm-encoder, wasmparser, and wit-parser from deny.toml
201+
# wasm-tools family:
186202
wasmparser = "0.104.0"
187203
wat = "1.0.63"
188204
wast = "57.0.0"
@@ -191,20 +207,21 @@ wasm-encoder = "0.26.0"
191207
wasm-smith = "0.12.7"
192208
wasm-mutate = "0.2.24"
193209
wit-parser = "0.7.1"
210+
wit-component = "0.7.2"
211+
212+
# Non-Bytecode Alliance maintained dependencies:
213+
# --------------------------
214+
object = { version = "0.30.3", default-features = false, features = ['read_core', 'elf', 'std'] }
215+
gimli = { version = "0.27.0", default-features = false, features = ['read', 'std'] }
216+
anyhow = "1.0.22"
194217
windows-sys = "0.48.0"
195218
env_logger = "0.10"
196-
rustix = "0.37.13"
197219
log = { version = "0.4.8", default-features = false }
198-
object = { version = "0.30.3", default-features = false, features = ['read_core', 'elf', 'std'] }
199-
gimli = { version = "0.27.0", default-features = false, features = ['read', 'std'] }
200220
clap = { version = "3.2.0", features = ["color", "suggestions", "derive"] }
201221
hashbrown = "0.13.2"
202-
cap-std = "1.0.0"
203-
cap-rand = "1.0.0"
204222
capstone = "0.9.0"
205223
once_cell = "1.12.0"
206224
smallvec = { version = "1.6.1", features = ["union"] }
207-
io-lifetimes = { version = "1.0.0", default-features = false }
208225
tracing = "0.1.26"
209226
bitflags = "1.2"
210227
thiserror = "1.0.15"
@@ -216,8 +233,10 @@ serde = "1.0.94"
216233
serde_json = "1.0.80"
217234
glob = "0.3.0"
218235
libfuzzer-sys = "0.4.0"
219-
regalloc2 = "0.8.1"
220236
walkdir = "2.3.3"
237+
cfg-if = "1.0"
238+
tempfile = "3.1.0"
239+
filecheck = "0.5.0"
221240

222241
[features]
223242
default = [

cranelift/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ path = "tests/filetests.rs"
1919
harness = false
2020

2121
[dependencies]
22-
cfg-if = "1.0"
22+
cfg-if = { workspace = true }
2323
cranelift-codegen = { workspace = true, features = ["disas"] }
2424
cranelift-entity = { workspace = true }
2525
cranelift-interpreter = { workspace = true }
@@ -32,7 +32,7 @@ cranelift-module = { workspace = true }
3232
cranelift-object = { workspace = true }
3333
cranelift-jit = { workspace = true }
3434
cranelift = { workspace = true }
35-
filecheck = "0.5.0"
35+
filecheck = { workspace = true }
3636
log = { workspace = true }
3737
termcolor = "1.1.2"
3838
capstone = { workspace = true, optional = true }

cranelift/filetests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cranelift-jit = { workspace = true, features = ["selinux-fix"] }
1919
cranelift-module = { workspace = true }
2020
cranelift-control = { workspace = true }
2121
file-per-thread-logger = "0.1.2"
22-
filecheck = "0.5.0"
22+
filecheck = { workspace = true }
2323
gimli = { workspace = true }
2424
log = { workspace = true }
2525
num_cpus = "1.8.0"

crates/asm-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ version.workspace = true
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
cfg-if = "1"
13+
cfg-if = { workspace = true }

crates/fiber/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ edition.workspace = true
1414
links = "wasmtime-fiber-shims"
1515

1616
[dependencies]
17-
cfg-if = "1.0"
17+
cfg-if = { workspace = true }
1818

1919
[target.'cfg(unix)'.dependencies]
2020
rustix = { workspace = true, features = ["mm", "param"] }

crates/jit-icache-coherence/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
99
edition.workspace = true
1010

1111
[dependencies]
12-
cfg-if = "1.0"
12+
cfg-if = { workspace = true }
1313

1414
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
1515
workspace = true

crates/jit/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ wasmtime-jit-debug = { workspace = true, features = ["perf_jitdump"], optional =
1616
wasmtime-runtime = { workspace = true }
1717
target-lexicon = { workspace = true }
1818
anyhow = { workspace = true }
19-
cfg-if = "1.0"
19+
cfg-if = { workspace = true }
2020
gimli = { workspace = true }
2121
object = { workspace = true }
2222
serde = { version = "1.0.94", features = ["derive"] }

crates/runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ libc = { version = "0.2.112", default-features = false }
1919
log = { workspace = true }
2020
memoffset = "0.8.0"
2121
indexmap = "1.0.2"
22-
cfg-if = "1.0"
22+
cfg-if = { workspace = true }
2323
rand = { version = "0.8.3", features = ['small_rng'] }
2424
anyhow = { workspace = true }
2525
memfd = "0.6.2"

crates/test-programs/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ publish = false
88
license = "Apache-2.0 WITH LLVM-exception"
99

1010
[build-dependencies]
11-
cfg-if = "1.0"
11+
cfg-if = { workspace = true }
1212
cargo_metadata = "0.15.3"
13-
wit-component = "0.7.4"
14-
heck = "0.4.0"
13+
wit-component = { workspace = true }
14+
heck = { workspace = true }
1515

1616
[dev-dependencies]
1717
anyhow = { workspace = true }
18-
tempfile = "3.1.0"
1918
test-log = { version = "0.2", default-features = false, features = ["trace"] }
2019
tracing = { workspace = true }
2120
tracing-subscriber = { version = "0.3.1", default-features = false, features = ['fmt', 'env-filter'] }

0 commit comments

Comments
 (0)