Skip to content

Commit

Permalink
convert more dependencies to { workspace = true }
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Pat Hickey committed May 16, 2023
1 parent 4745cab commit 7c4fe4a
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 26 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 29 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ rustix = { workspace = true, features = ["mm", "param"] }
wasmtime = { workspace = true, features = ['component-model', 'async', 'default', 'winch'] }
env_logger = { workspace = true }
log = { workspace = true }
filecheck = "0.5.0"
tempfile = "3.1.0"
filecheck = { workspace = true }
tempfile = { workspace = true }
test-programs = { path = "crates/test-programs" }
wasmtime-runtime = { workspace = true }
tokio = { version = "1.8.0", features = ["rt", "time", "macros", "rt-multi-thread"] }
Expand Down Expand Up @@ -181,8 +181,24 @@ winch-test-macros = { path = "winch/test-macros" }
wasi-preview1-component-adapter = { path = "crates/wasi-preview1-component-adapter" }
byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-array-literals" }

# Bytecode Alliance maintained dependencies:
# ---------------------------
regalloc2 = "0.8.1"

# cap-std family:
target-lexicon = { version = "0.12.3", default-features = false, features = ["std"] }
anyhow = "1.0.22"
cap-std = "1.0.0"
cap-rand = "1.0.0"
io-lifetimes = { version = "1.0.0", default-features = false }
rustix = "0.37.13"

# wit-bindgen:
wit-bindgen = "0.6.0"

# FIXME: the above wit-bindgen depends on versions ahead of the wasm-tools
# dependencies below. When the below are updated, remove the exception
# for duplicate wasm-encoder, wasmparser, and wit-parser from deny.toml
# wasm-tools family:
wasmparser = "0.104.0"
wat = "1.0.63"
wast = "57.0.0"
Expand All @@ -191,20 +207,21 @@ wasm-encoder = "0.26.0"
wasm-smith = "0.12.7"
wasm-mutate = "0.2.24"
wit-parser = "0.7.1"
wit-component = "0.7.2"

# Non-Bytecode Alliance maintained dependencies:
# --------------------------
object = { version = "0.30.3", default-features = false, features = ['read_core', 'elf', 'std'] }
gimli = { version = "0.27.0", default-features = false, features = ['read', 'std'] }
anyhow = "1.0.22"
windows-sys = "0.48.0"
env_logger = "0.10"
rustix = "0.37.13"
log = { version = "0.4.8", default-features = false }
object = { version = "0.30.3", default-features = false, features = ['read_core', 'elf', 'std'] }
gimli = { version = "0.27.0", default-features = false, features = ['read', 'std'] }
clap = { version = "3.2.0", features = ["color", "suggestions", "derive"] }
hashbrown = "0.13.2"
cap-std = "1.0.0"
cap-rand = "1.0.0"
capstone = "0.9.0"
once_cell = "1.12.0"
smallvec = { version = "1.6.1", features = ["union"] }
io-lifetimes = { version = "1.0.0", default-features = false }
tracing = "0.1.26"
bitflags = "1.2"
thiserror = "1.0.15"
Expand All @@ -216,8 +233,10 @@ serde = "1.0.94"
serde_json = "1.0.80"
glob = "0.3.0"
libfuzzer-sys = "0.4.0"
regalloc2 = "0.8.1"
walkdir = "2.3.3"
cfg-if = "1.0"
tempfile = "3.1.0"
filecheck = "0.5.0"

[features]
default = [
Expand Down
4 changes: 2 additions & 2 deletions cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ path = "tests/filetests.rs"
harness = false

[dependencies]
cfg-if = "1.0"
cfg-if = { workspace = true }
cranelift-codegen = { workspace = true, features = ["disas"] }
cranelift-entity = { workspace = true }
cranelift-interpreter = { workspace = true }
Expand All @@ -32,7 +32,7 @@ cranelift-module = { workspace = true }
cranelift-object = { workspace = true }
cranelift-jit = { workspace = true }
cranelift = { workspace = true }
filecheck = "0.5.0"
filecheck = { workspace = true }
log = { workspace = true }
termcolor = "1.1.2"
capstone = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion cranelift/filetests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cranelift-jit = { workspace = true, features = ["selinux-fix"] }
cranelift-module = { workspace = true }
cranelift-control = { workspace = true }
file-per-thread-logger = "0.1.2"
filecheck = "0.5.0"
filecheck = { workspace = true }
gimli = { workspace = true }
log = { workspace = true }
num_cpus = "1.8.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/asm-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cfg-if = "1"
cfg-if = { workspace = true }
2 changes: 1 addition & 1 deletion crates/fiber/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ edition.workspace = true
links = "wasmtime-fiber-shims"

[dependencies]
cfg-if = "1.0"
cfg-if = { workspace = true }

[target.'cfg(unix)'.dependencies]
rustix = { workspace = true, features = ["mm", "param"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/jit-icache-coherence/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime"
edition.workspace = true

[dependencies]
cfg-if = "1.0"
cfg-if = { workspace = true }

[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/jit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ wasmtime-jit-debug = { workspace = true, features = ["perf_jitdump"], optional =
wasmtime-runtime = { workspace = true }
target-lexicon = { workspace = true }
anyhow = { workspace = true }
cfg-if = "1.0"
cfg-if = { workspace = true }
gimli = { workspace = true }
object = { workspace = true }
serde = { version = "1.0.94", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ libc = { version = "0.2.112", default-features = false }
log = { workspace = true }
memoffset = "0.8.0"
indexmap = "1.0.2"
cfg-if = "1.0"
cfg-if = { workspace = true }
rand = { version = "0.8.3", features = ['small_rng'] }
anyhow = { workspace = true }
memfd = "0.6.2"
Expand Down
7 changes: 3 additions & 4 deletions crates/test-programs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ publish = false
license = "Apache-2.0 WITH LLVM-exception"

[build-dependencies]
cfg-if = "1.0"
cfg-if = { workspace = true }
cargo_metadata = "0.15.3"
wit-component = "0.7.4"
heck = "0.4.0"
wit-component = { workspace = true }
heck = { workspace = true }

[dev-dependencies]
anyhow = { workspace = true }
tempfile = "3.1.0"
test-log = { version = "0.2", default-features = false, features = ["trace"] }
tracing = { workspace = true }
tracing-subscriber = { version = "0.3.1", default-features = false, features = ['fmt', 'env-filter'] }
Expand Down
4 changes: 2 additions & 2 deletions crates/test-programs/wasi-http-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2021"
publish = false

[dependencies]
anyhow = "1"
wit-bindgen = "0.6.0"
anyhow = { workspace = true }
wit-bindgen = { workspace = true }
2 changes: 1 addition & 1 deletion crates/wasmtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ target-lexicon = { workspace = true }
wasmparser = { workspace = true }
anyhow = { workspace = true }
libc = "0.2"
cfg-if = "1.0"
cfg-if = { workspace = true }
log = { workspace = true }
wat = { workspace = true, optional = true }
serde = { version = "1.0.94", features = ["derive"] }
Expand Down

0 comments on commit 7c4fe4a

Please sign in to comment.