Skip to content

Commit aebc349

Browse files
ljahierhannesdejager
authored andcommitted
chore: migrate shared dependencies to workspace-level management
1 parent f469654 commit aebc349

7 files changed

Lines changed: 96 additions & 74 deletions

File tree

Cargo.toml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,28 @@ missing_docs = "deny"
3636
[workspace.lints.clippy]
3737
all = "deny"
3838

39+
[workspace.dependencies]
40+
async-trait = "0.1.88"
41+
base64 = "0.22.1"
42+
bytes = "1.11.1"
43+
chrono = { version = "0.4.43", default-features = false }
44+
futures = { version = "0.3.31", default-features = false, features = ["std"] }
45+
http-body-util = "0.1.3"
46+
hyper = { version = "1.8.1", features = ["client", "http1"] }
47+
hyper-rustls = "0.27.7"
48+
hyper-util = "0.1.20"
49+
lazy_static = "1.5.0"
50+
libunftp = { version = "0.22.0", path = ".", default-features = false }
51+
percent-encoding = "2.3.2"
52+
serde = { version = "1.0.228", features = ["derive"] }
53+
serde_json = "1.0.149"
54+
tokio = { version = "1.49.0" }
55+
tokio-stream = "0.1.18"
56+
tokio-util = { version = "0.7.18" }
57+
tracing = { version = "0.1.44", default-features = false }
58+
tracing-attributes = "0.1.31"
59+
getrandom = "0.3.4"
60+
3961
[features]
4062
ring = ["rustls/ring", "rustls/logging", "rustls/std", "rustls/tls12"]
4163
aws_lc_rs = ["rustls/aws_lc_rs", "rustls/logging", "rustls/std", "rustls/tls12"]
@@ -46,14 +68,14 @@ default = ["aws_lc_rs", "prometheus", "proxy_protocol"]
4668
all = ["aws_lc_rs", "prometheus", "proxy_protocol"]
4769

4870
[dependencies]
49-
async-trait = "0.1.88"
71+
async-trait.workspace = true
5072
bitflags = "2.10.0"
51-
bytes = "1.11.1"
52-
chrono = { version = "0.4.43", default-features = false, features = ["clock", "std"] }
73+
bytes.workspace = true
74+
chrono = { workspace = true, features = ["clock", "std"] }
5375
derive_more = { version = "2.1.1", features = ["display"] }
5476
futures-util = { version = "0.3.31", default-features = false, features = ["alloc", "sink"] }
55-
getrandom = "0.3.4"
56-
lazy_static = "1.5.0"
77+
getrandom.workspace = true
78+
lazy_static.workspace = true
5779
md-5 = "0.10.6"
5880
moka = { version = "0.12.13", default-features = false, features = ["sync"] }
5981
nix = { version = "0.30.1", default-features = false, features = ["fs"] }
@@ -63,11 +85,11 @@ rustls = { version = "0.23.36", default-features = false }
6385
slog = { version = "2.8.2", features = ["max_level_trace", "release_max_level_info"] }
6486
slog-stdlog = "4.1.1"
6587
thiserror = "2.0.18"
66-
tokio = { version = "1.49.0", features = ["macros", "rt", "net", "process", "sync", "io-util", "time"] }
88+
tokio = { workspace = true, features = ["macros", "rt", "net", "process", "sync", "io-util", "time"] }
6789
tokio-rustls = { version = "0.26.4", default-features = false }
68-
tokio-util = { version = "0.7.18", features = ["codec"] }
69-
tracing = { version = "0.1.44", default-features = false }
70-
tracing-attributes = "0.1.31"
90+
tokio-util = { workspace = true, features = ["codec"] }
91+
tracing.workspace = true
92+
tracing-attributes.workspace = true
7193
uuid = { version = "1.20.0", features = ["v4"] }
7294
x509-parser = "0.18.1"
7395
dashmap = "6.1.0"
@@ -76,7 +98,7 @@ libc = "0.2"
7698
[dev-dependencies]
7799
libunftp = { path = "." }
78100
pretty_assertions = "1.4.1"
79-
tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] }
101+
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
80102
unftp-sbe-fs = { path = "../libunftp/crates/unftp-sbe-fs" }
81103

82104
[lints]

crates/unftp-auth-jsonfile/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@ aws_lc_rs = ["libunftp/aws_lc_rs"]
2323
ring = ["libunftp/ring"]
2424

2525
[dependencies]
26-
async-trait = "0.1.88"
27-
base64 = "0.22.1"
28-
bytes = "1.11.1"
26+
async-trait.workspace = true
27+
base64.workspace = true
28+
bytes.workspace = true
2929
ipnet = "2.11.0"
3030
iprange = "0.6.7"
31-
libunftp = { version = "0.22.0", path = "../../", default-features = false }
31+
libunftp.workspace = true
3232
ring = "0.17.14"
33-
serde = { version = "1.0.228", features = ["derive"] }
34-
serde_json = "1.0.149"
35-
tokio = { version = "1.49.0", features = ["rt", "time"] }
36-
tracing = { version = "0.1.44", default-features = false }
37-
tracing-attributes = "0.1.31"
33+
serde.workspace = true
34+
serde_json.workspace = true
35+
tokio = { workspace = true, features = ["rt", "time"] }
36+
tracing.workspace = true
37+
tracing-attributes.workspace = true
3838
valid = "0.3.1"
3939
flate2 = "1.1.9"
4040

4141
[dev-dependencies]
4242
pretty_env_logger = "0.5.0"
43-
tokio = { version = "1.49.0", features = ["macros"] }
43+
tokio = { workspace = true, features = ["macros"] }
4444
unftp-sbe-fs = { version = "0.3.0", path = "../unftp-sbe-fs" }
4545

4646
[lints]

crates/unftp-auth-pam/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ aws_lc_rs = ["libunftp/aws_lc_rs"]
2424
ring = ["libunftp/ring"]
2525

2626
[dependencies]
27-
async-trait = "0.1.88"
28-
libunftp = { version = "0.22.0", path = "../../", default-features = false }
29-
tracing = { version = "0.1.44", default-features = false }
30-
tracing-attributes = "0.1.31"
27+
async-trait.workspace = true
28+
libunftp.workspace = true
29+
tracing.workspace = true
30+
tracing-attributes.workspace = true
3131

3232
[target.'cfg(target_family = "unix")'.dependencies]
3333
pam-auth = { package = "pam", version = "0.7.0" }
3434

3535
[dev-dependencies]
36-
tokio = { version = "1.49.0", features = ["macros"] }
36+
tokio = { workspace = true, features = ["macros"] }
3737

3838
[lints]
3939
workspace = true

crates/unftp-auth-rest/Cargo.toml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,23 @@ aws_lc_rs = ["libunftp/aws_lc_rs"]
2323
ring = ["libunftp/ring"]
2424

2525
[dependencies]
26-
async-trait = "0.1.88"
27-
http-body-util = "0.1.3"
28-
hyper = { version = "1.8.1", features = ["client", "http1"] }
29-
hyper-rustls = "0.27.7"
30-
hyper-util = "0.1.20"
31-
libunftp = { version = "0.22.0", path = "../../", default-features = false }
32-
percent-encoding = "2.3.2"
26+
async-trait.workspace = true
27+
http-body-util.workspace = true
28+
hyper.workspace = true
29+
hyper-rustls.workspace = true
30+
hyper-util.workspace = true
31+
libunftp.workspace = true
32+
percent-encoding.workspace = true
3333
regex = "1.12.3"
34-
serde = { version = "1.0.228", features = ["derive"] }
35-
serde_json = "1.0.149"
36-
tokio = { version = "1.49.0", features = ["rt", "net", "sync", "io-util", "time"] }
37-
tracing = { version = "0.1.44", default-features = false }
38-
tracing-attributes = "0.1.31"
39-
34+
serde.workspace = true
35+
serde_json.workspace = true
36+
tokio = { workspace = true, features = ["rt", "net", "sync", "io-util", "time"] }
37+
tracing.workspace = true
38+
tracing-attributes.workspace = true
4039

4140
[dev-dependencies]
4241
pretty_env_logger = "0.5.0"
43-
tokio = { version = "1.49.0", features = ["macros"] }
42+
tokio = { workspace = true, features = ["macros"] }
4443
unftp-sbe-fs = { version = "0.3.0", path = "../unftp-sbe-fs" }
4544

4645
[lints]

crates/unftp-sbe-fs/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ aws_lc_rs = ["libunftp/aws_lc_rs"]
2424
default = ["aws_lc_rs"]
2525

2626
[dependencies]
27-
async-trait = "0.1.88"
27+
async-trait.workspace = true
2828
cfg-if = "1.0"
2929
cap-std = "4.0"
30-
futures = { version = "0.3.31", default-features = false, features = ["std"] }
31-
lazy_static = "1.5.0"
32-
libunftp = { version = "0.22.0", path = "../../", default-features = false }
30+
futures.workspace = true
31+
lazy_static.workspace = true
32+
libunftp.workspace = true
3333
path_abs = "0.5.1"
34-
tokio = { version = "1.49.0", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
35-
tokio-stream = "0.1.18"
36-
tracing = { version = "0.1.44", default-features = false }
37-
tracing-attributes = "0.1.31"
34+
tokio = { workspace = true, features = ["rt", "net", "sync", "io-util", "time", "fs"] }
35+
tokio-stream.workspace = true
36+
tracing.workspace = true
37+
tracing-attributes.workspace = true
3838

3939
[dev-dependencies]
4040
async_ftp = "6.0.0"
41-
async-trait = "0.1.88"
41+
async-trait.workspace = true
4242
chrono = "0.4.43"
4343
libunftp = { path = "../../", features = ["proxy_protocol"] }
4444
more-asserts = "0.3.1"
@@ -47,14 +47,14 @@ pretty_assertions = "1.4.1"
4747
pretty_env_logger = "0.5.0"
4848
regex = "1.12.3"
4949
rstest = "0.26.1"
50-
serde = { version = "1.0.228", features = ["derive"] }
51-
serde_json = "1.0.149"
50+
serde.workspace = true
51+
serde_json.workspace = true
5252
slog-async = "2.8.0"
5353
slog-term = "2.9.2"
5454
tempfile = "3.24.0"
55-
tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] }
55+
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
5656
tracing-subscriber = "0.3.22"
57-
getrandom = "0.3.4"
57+
getrandom.workspace = true
5858

5959
[target.'cfg(target_os = "freebsd")'.dev-dependencies]
6060
capsicum = { version = "0.4.4", features = ["casper"] }

crates/unftp-sbe-gcs/Cargo.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,32 @@ aws_lc_rs = ["libunftp/aws_lc_rs"]
2323
ring = ["libunftp/ring"]
2424

2525
[dependencies]
26-
async-trait = "0.1.88"
27-
base64 = "0.22.1"
28-
bytes = "1.11.1"
29-
chrono = { version = "0.4.43", default-features = false, features = ["std", "serde"] }
30-
futures = { version = "0.3.31", default-features = false, features = ["std"] }
31-
http-body-util = "0.1.3"
32-
hyper = { version = "1.8.1", features = ["client", "http1"] }
33-
hyper-rustls = "0.27.7"
34-
hyper-util = "0.1.20"
35-
libunftp = { version = "0.22.0", path = "../../", default-features = false }
26+
async-trait.workspace = true
27+
base64.workspace = true
28+
bytes.workspace = true
29+
chrono = { workspace = true, features = ["std", "serde"] }
30+
futures.workspace = true
31+
http-body-util.workspace = true
32+
hyper.workspace = true
33+
hyper-rustls.workspace = true
34+
hyper-util.workspace = true
35+
libunftp.workspace = true
3636
mime = "0.3.17"
37-
percent-encoding = "2.3.2"
38-
serde = { version = "1.0.228", features = ["derive"] }
39-
serde_json = "1.0.149"
37+
percent-encoding.workspace = true
38+
serde.workspace = true
39+
serde_json.workspace = true
4040
time = "0.3.47"
41-
tokio = { version = "1.49.0", features = ["rt", "net", "sync", "io-util", "time", "fs"] }
42-
tokio-stream = "0.1.18"
43-
tokio-util = { version = "0.7.18", features = ["codec", "compat"] }
44-
tracing = { version = "0.1.44", default-features = false }
45-
tracing-attributes = "0.1.31"
41+
tokio = { workspace = true, features = ["rt", "net", "sync", "io-util", "time", "fs"] }
42+
tokio-stream.workspace = true
43+
tokio-util = { workspace = true, features = ["codec", "compat"] }
44+
tracing.workspace = true
45+
tracing-attributes.workspace = true
4646
yup-oauth2 = { version = "12.1.2", default-features = false, features = ["hyper-rustls", "service-account", "aws-lc-rs"] }
4747

4848
[dev-dependencies]
4949
async_ftp = "6.0.0"
5050
clap = { version = "4.5.57", features = ["env"] }
51-
lazy_static = "1.5.0"
51+
lazy_static.workspace = true
5252
more-asserts = "0.3.1"
5353
path_abs = "0.5.1"
5454
pretty_assertions = "1.4.1"
@@ -58,5 +58,5 @@ slog-async = "2.8.0"
5858
slog-stdlog = "4.1.1"
5959
slog-term = "2.9.2"
6060
tempfile = "3.24.0"
61-
tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] }
61+
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
6262
tracing-subscriber = "0.3.22"

src/storage/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
//!
77
//! To create a new storage back-end:
88
//!
9-
//! 1. Declare a dependency on the async-trait crate
9+
//! 1. Declare dependencies on the async-trait and libunftp crates
1010
//!
1111
//! ```toml
12-
//! async-trait = "0.1.50"
12+
//! async-trait = { workspace = true }
13+
//! libunftp = { workspace = true }
1314
//! ```
1415
//!
1516
//! 2. Implement the [`StorageBackend`] trait and optionally the [`Metadata`] trait:

0 commit comments

Comments
 (0)