meta: Switch to workspace dependencies

We have a handful of repeated dependencies that can be cleaned up, so
change here.
This commit is contained in:
Trevor Gross 2026-02-07 06:33:33 -06:00
parent 5768fb7d93
commit 0538f7b2ab
10 changed files with 82 additions and 48 deletions

View file

@ -31,6 +31,39 @@ exclude = [
"compiler-builtins",
]
[workspace.dependencies]
anyhow = "1.0.101"
assert_cmd = "2.1.2"
cc = "1.2.55"
compiler_builtins = { path = "builtins-shim", default-features = false }
criterion = { version = "0.6.0", default-features = false, features = ["cargo_bench_support"] }
getrandom = "0.3.4"
gmp-mpfr-sys = { version = "1.6.8", default-features = false }
gungraun = "0.17.0"
heck = "0.5.0"
indicatif = { version = "0.18.3", default-features = false }
libm = { path = "libm", default-features = false }
libm-macros = { path = "crates/libm-macros" }
libm-test = { path = "libm-test", default-features = false }
libtest-mimic = "0.8.1"
musl-math-sys = { path = "crates/musl-math-sys" }
no-panic = "0.1.35"
object = { version = "0.37.3", features = ["wasm"] }
panic-handler = { path = "crates/panic-handler" }
paste = "1.0.15"
proc-macro2 = "1.0.106"
quote = "1.0.44"
rand = "0.9.2"
rand_chacha = "0.9.0"
rand_xoshiro = "0.7"
rayon = "1.11.0"
regex = "1.12.3"
rug = { version = "1.28.1", default-features = false, features = ["float", "integer", "std"] }
rustc_apfloat = "0.2.3"
serde_json = "1.0.149"
syn = "2.0.114"
tempfile = "3.24.0"
[profile.release]
panic = "abort"

View file

@ -7,6 +7,9 @@
# manifest that is identical except for the `core` dependency and forwards
# to the same sources, which acts as the `compiler-builtins` Cargo entrypoint
# for out of tree testing
#
# Ideally we can eventually replace this with a patch in the workspace
# manifest <https://github.com/rust-lang/cargo/issues/4648>.
[package]
name = "compiler_builtins"
@ -33,7 +36,7 @@ doctest = false
test = false
[build-dependencies]
cc = { optional = true, version = "1.2" }
cc = { version = "1.2", optional = true }
[features]
default = ["compiler-builtins"]

View file

@ -6,23 +6,22 @@ publish = false
license = "MIT AND Apache-2.0 WITH LLVM-exception AND (MIT OR Apache-2.0)"
[dependencies]
compiler_builtins = { workspace = true, features = ["unstable-public-internals"] }
# For fuzzing tests we want a deterministic seedable RNG. We also eliminate potential
# problems with system RNGs on the variety of platforms this crate is tested on.
# `xoshiro128**` is used for its quality, size, and speed at generating `u32` shift amounts.
rand_xoshiro = "0.7"
# To compare float builtins against
rustc_apfloat = "0.2.3"
# Really a dev dependency, but dev dependencies can't be optional
gungraun = { version = "0.17.0", optional = true }
rand_xoshiro.workspace = true
[dependencies.compiler_builtins]
path = "../builtins-shim"
default-features = false
features = ["unstable-public-internals"]
# To compare float builtins against
rustc_apfloat.workspace = true
# Really a dev dependency, but dev dependencies can't be optional
gungraun = { workspace = true, optional = true }
[dev-dependencies]
criterion = { version = "0.6.0", default-features = false, features = ["cargo_bench_support"] }
paste = "1.0.15"
criterion.workspace = true
paste.workspace = true
[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
test = { git = "https://github.com/japaric/utest" }

View file

@ -31,7 +31,7 @@ doc = false
core = { path = "../../core", optional = true }
[build-dependencies]
cc = { optional = true, version = "1.2" }
cc = { version = "1.2", optional = true }
[features]
default = ["compiler-builtins"]

View file

@ -9,10 +9,10 @@ license = "MIT OR Apache-2.0"
proc-macro = true
[dependencies]
heck = "0.5.0"
proc-macro2 = "1.0.106"
quote = "1.0.44"
syn = { version = "2.0.114", features = ["full", "extra-traits", "visit-mut"] }
heck.workspace = true
proc-macro2.workspace = true
quote.workspace = true
syn = { workspace = true, features = ["full", "extra-traits", "visit-mut"] }
[lints.rust]
# Values used during testing

View file

@ -5,10 +5,8 @@ edition = "2024"
publish = false
license = "MIT OR Apache-2.0"
[dependencies]
[dev-dependencies]
libm = { path = "../../libm" }
libm.workspace = true
[build-dependencies]
cc = "1.2.55"
cc.workspace = true

View file

@ -5,11 +5,11 @@ edition = "2024"
publish = false
[dependencies]
object = { version = "0.37.3", features = ["wasm"] }
regex = "1.12.3"
serde_json = "1.0.149"
object.workspace = true
regex.workspace = true
serde_json.workspace = true
[dev-dependencies]
assert_cmd = "2.1.2"
cc = "1.2.55"
tempfile = "3.24.0"
assert_cmd.workspace = true
cc.workspace = true
tempfile.workspace = true

View file

@ -12,8 +12,8 @@ build-mpfr = ["libm-test/build-mpfr", "dep:rug"]
unstable-float = ["libm/unstable-float", "libm-test/unstable-float", "rug?/nightly-float"]
[dependencies]
libm = { path = "../../libm", default-features = false }
libm-macros = { path = "../libm-macros" }
libm-test = { path = "../../libm-test", default-features = false }
musl-math-sys = { path = "../musl-math-sys", optional = true }
rug = { version = "1.28.1", optional = true, default-features = false, features = ["float", "std"] }
libm.workspace = true
libm-macros.workspace = true
libm-test.workspace = true
musl-math-sys = { workspace = true, optional = true }
rug = { workspace = true, optional = true }

View file

@ -28,29 +28,29 @@ icount = ["dep:gungraun"]
short-benchmarks = []
[dependencies]
anyhow = "1.0.101"
anyhow.workspace = true
# This is not directly used but is required so we can enable `gmp-mpfr-sys/force-cross`.
gmp-mpfr-sys = { version = "1.6.8", optional = true, default-features = false }
gungraun = { version = "0.17.0", optional = true }
indicatif = { version = "0.18.3", default-features = false }
libm = { path = "../libm", features = ["unstable-public-internals"] }
libm-macros = { path = "../crates/libm-macros" }
musl-math-sys = { path = "../crates/musl-math-sys", optional = true }
paste = "1.0.15"
rand = "0.9.2"
rand_chacha = "0.9.0"
rayon = "1.11.0"
rug = { version = "1.28.1", optional = true, default-features = false, features = ["float", "integer", "std"] }
gmp-mpfr-sys = { workspace = true, optional = true }
gungraun = { workspace = true, optional = true }
indicatif.workspace = true
libm = { workspace = true, default-features = true, features = ["unstable-public-internals"] }
libm-macros.workspace = true
musl-math-sys = { workspace = true, optional = true }
paste.workspace = true
rand.workspace = true
rand_chacha.workspace = true
rayon.workspace = true
rug = { workspace = true, optional = true }
[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0.3.4", features = ["wasm_js"] }
getrandom = { workspace = true, features = ["wasm_js"] }
[build-dependencies]
rand = { version = "0.9.2", optional = true }
rand = { workspace = true, optional = true }
[dev-dependencies]
criterion = { version = "0.6.0", default-features = false, features = ["cargo_bench_support"] }
libtest-mimic = "0.8.1"
criterion.workspace = true
libtest-mimic.workspace = true
[[bench]]
name = "icount"

View file

@ -43,6 +43,7 @@ unstable-float = []
force-soft-floats = []
[dev-dependencies]
# FIXME(msrv): switch to `no-panic.workspace` when possible
no-panic = "0.1.35"
[lints.rust]