Skip to content

Commit 0538f7b

Browse files
committed
meta: Switch to workspace dependencies
We have a handful of repeated dependencies that can be cleaned up, so change here.
1 parent 5768fb7 commit 0538f7b

10 files changed

Lines changed: 81 additions & 47 deletions

File tree

library/compiler-builtins/Cargo.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,39 @@ exclude = [
3131
"compiler-builtins",
3232
]
3333

34+
[workspace.dependencies]
35+
anyhow = "1.0.101"
36+
assert_cmd = "2.1.2"
37+
cc = "1.2.55"
38+
compiler_builtins = { path = "builtins-shim", default-features = false }
39+
criterion = { version = "0.6.0", default-features = false, features = ["cargo_bench_support"] }
40+
getrandom = "0.3.4"
41+
gmp-mpfr-sys = { version = "1.6.8", default-features = false }
42+
gungraun = "0.17.0"
43+
heck = "0.5.0"
44+
indicatif = { version = "0.18.3", default-features = false }
45+
libm = { path = "libm", default-features = false }
46+
libm-macros = { path = "crates/libm-macros" }
47+
libm-test = { path = "libm-test", default-features = false }
48+
libtest-mimic = "0.8.1"
49+
musl-math-sys = { path = "crates/musl-math-sys" }
50+
no-panic = "0.1.35"
51+
object = { version = "0.37.3", features = ["wasm"] }
52+
panic-handler = { path = "crates/panic-handler" }
53+
paste = "1.0.15"
54+
proc-macro2 = "1.0.106"
55+
quote = "1.0.44"
56+
rand = "0.9.2"
57+
rand_chacha = "0.9.0"
58+
rand_xoshiro = "0.7"
59+
rayon = "1.11.0"
60+
regex = "1.12.3"
61+
rug = { version = "1.28.1", default-features = false, features = ["float", "integer", "std"] }
62+
rustc_apfloat = "0.2.3"
63+
serde_json = "1.0.149"
64+
syn = "2.0.114"
65+
tempfile = "3.24.0"
66+
3467
[profile.release]
3568
panic = "abort"
3669

library/compiler-builtins/builtins-shim/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# manifest that is identical except for the `core` dependency and forwards
88
# to the same sources, which acts as the `compiler-builtins` Cargo entrypoint
99
# for out of tree testing
10+
#
11+
# Ideally we can eventually replace this with a patch in the workspace
12+
# manifest <https://github.com/rust-lang/cargo/issues/4648>.
1013

1114
[package]
1215
name = "compiler_builtins"
@@ -33,7 +36,7 @@ doctest = false
3336
test = false
3437

3538
[build-dependencies]
36-
cc = { optional = true, version = "1.2" }
39+
cc = { version = "1.2", optional = true }
3740

3841
[features]
3942
default = ["compiler-builtins"]

library/compiler-builtins/builtins-test/Cargo.toml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@ publish = false
66
license = "MIT AND Apache-2.0 WITH LLVM-exception AND (MIT OR Apache-2.0)"
77

88
[dependencies]
9+
compiler_builtins = { workspace = true, features = ["unstable-public-internals"] }
10+
911
# For fuzzing tests we want a deterministic seedable RNG. We also eliminate potential
1012
# problems with system RNGs on the variety of platforms this crate is tested on.
1113
# `xoshiro128**` is used for its quality, size, and speed at generating `u32` shift amounts.
12-
rand_xoshiro = "0.7"
14+
rand_xoshiro.workspace = true
15+
1316
# To compare float builtins against
14-
rustc_apfloat = "0.2.3"
15-
# Really a dev dependency, but dev dependencies can't be optional
16-
gungraun = { version = "0.17.0", optional = true }
17+
rustc_apfloat.workspace = true
1718

18-
[dependencies.compiler_builtins]
19-
path = "../builtins-shim"
20-
default-features = false
21-
features = ["unstable-public-internals"]
19+
# Really a dev dependency, but dev dependencies can't be optional
20+
gungraun = { workspace = true, optional = true }
2221

2322
[dev-dependencies]
24-
criterion = { version = "0.6.0", default-features = false, features = ["cargo_bench_support"] }
25-
paste = "1.0.15"
23+
criterion.workspace = true
24+
paste.workspace = true
2625

2726
[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
2827
test = { git = "https://github.com/japaric/utest" }

library/compiler-builtins/compiler-builtins/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ doc = false
3131
core = { path = "../../core", optional = true }
3232

3333
[build-dependencies]
34-
cc = { optional = true, version = "1.2" }
34+
cc = { version = "1.2", optional = true }
3535

3636
[features]
3737
default = ["compiler-builtins"]

library/compiler-builtins/crates/libm-macros/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ license = "MIT OR Apache-2.0"
99
proc-macro = true
1010

1111
[dependencies]
12-
heck = "0.5.0"
13-
proc-macro2 = "1.0.106"
14-
quote = "1.0.44"
15-
syn = { version = "2.0.114", features = ["full", "extra-traits", "visit-mut"] }
12+
heck.workspace = true
13+
proc-macro2.workspace = true
14+
quote.workspace = true
15+
syn = { workspace = true, features = ["full", "extra-traits", "visit-mut"] }
1616

1717
[lints.rust]
1818
# Values used during testing

library/compiler-builtins/crates/musl-math-sys/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ edition = "2024"
55
publish = false
66
license = "MIT OR Apache-2.0"
77

8-
[dependencies]
9-
108
[dev-dependencies]
11-
libm = { path = "../../libm" }
9+
libm.workspace = true
1210

1311
[build-dependencies]
14-
cc = "1.2.55"
12+
cc.workspace = true

library/compiler-builtins/crates/symbol-check/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ edition = "2024"
55
publish = false
66

77
[dependencies]
8-
object = { version = "0.37.3", features = ["wasm"] }
9-
regex = "1.12.3"
10-
serde_json = "1.0.149"
8+
object.workspace = true
9+
regex.workspace = true
10+
serde_json.workspace = true
1111

1212
[dev-dependencies]
13-
assert_cmd = "2.1.2"
14-
cc = "1.2.55"
15-
tempfile = "3.24.0"
13+
assert_cmd.workspace = true
14+
cc.workspace = true
15+
tempfile.workspace = true

library/compiler-builtins/crates/util/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ build-mpfr = ["libm-test/build-mpfr", "dep:rug"]
1212
unstable-float = ["libm/unstable-float", "libm-test/unstable-float", "rug?/nightly-float"]
1313

1414
[dependencies]
15-
libm = { path = "../../libm", default-features = false }
16-
libm-macros = { path = "../libm-macros" }
17-
libm-test = { path = "../../libm-test", default-features = false }
18-
musl-math-sys = { path = "../musl-math-sys", optional = true }
19-
rug = { version = "1.28.1", optional = true, default-features = false, features = ["float", "std"] }
15+
libm.workspace = true
16+
libm-macros.workspace = true
17+
libm-test.workspace = true
18+
musl-math-sys = { workspace = true, optional = true }
19+
rug = { workspace = true, optional = true }

library/compiler-builtins/libm-test/Cargo.toml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,29 @@ icount = ["dep:gungraun"]
2828
short-benchmarks = []
2929

3030
[dependencies]
31-
anyhow = "1.0.101"
31+
anyhow.workspace = true
3232
# This is not directly used but is required so we can enable `gmp-mpfr-sys/force-cross`.
33-
gmp-mpfr-sys = { version = "1.6.8", optional = true, default-features = false }
34-
gungraun = { version = "0.17.0", optional = true }
35-
indicatif = { version = "0.18.3", default-features = false }
36-
libm = { path = "../libm", features = ["unstable-public-internals"] }
37-
libm-macros = { path = "../crates/libm-macros" }
38-
musl-math-sys = { path = "../crates/musl-math-sys", optional = true }
39-
paste = "1.0.15"
40-
rand = "0.9.2"
41-
rand_chacha = "0.9.0"
42-
rayon = "1.11.0"
43-
rug = { version = "1.28.1", optional = true, default-features = false, features = ["float", "integer", "std"] }
33+
gmp-mpfr-sys = { workspace = true, optional = true }
34+
gungraun = { workspace = true, optional = true }
35+
indicatif.workspace = true
36+
libm = { workspace = true, default-features = true, features = ["unstable-public-internals"] }
37+
libm-macros.workspace = true
38+
musl-math-sys = { workspace = true, optional = true }
39+
paste.workspace = true
40+
rand.workspace = true
41+
rand_chacha.workspace = true
42+
rayon.workspace = true
43+
rug = { workspace = true, optional = true }
4444

4545
[target.'cfg(target_family = "wasm")'.dependencies]
46-
getrandom = { version = "0.3.4", features = ["wasm_js"] }
46+
getrandom = { workspace = true, features = ["wasm_js"] }
4747

4848
[build-dependencies]
49-
rand = { version = "0.9.2", optional = true }
49+
rand = { workspace = true, optional = true }
5050

5151
[dev-dependencies]
52-
criterion = { version = "0.6.0", default-features = false, features = ["cargo_bench_support"] }
53-
libtest-mimic = "0.8.1"
52+
criterion.workspace = true
53+
libtest-mimic.workspace = true
5454

5555
[[bench]]
5656
name = "icount"

library/compiler-builtins/libm/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ unstable-float = []
4343
force-soft-floats = []
4444

4545
[dev-dependencies]
46+
# FIXME(msrv): switch to `no-panic.workspace` when possible
4647
no-panic = "0.1.35"
4748

4849
[lints.rust]

0 commit comments

Comments
 (0)