Skip to content

Commit 892cdcf

Browse files
cargo: move dependency version to cargo dependency
Cargo deny recently added a new feature for checking duplicate dependencies: rust-lang/cargo#12162 This helps to unify all the dependencies from different sub crate to use the same version
1 parent 72d8316 commit 892cdcf

File tree

6 files changed

+96
-70
lines changed

6 files changed

+96
-70
lines changed

Cargo.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,29 @@ debug = 1
1717
[workspace.lints.clippy]
1818
undocumented_unsafe_blocks = "deny"
1919
unsafe_code = "deny"
20+
21+
[workspace.dependencies]
22+
twelf = { version = "0.15.0", default-features = false, features = ["env", "clap", "yaml"]}
23+
tracing-subscriber = "0.3.17"
24+
tracing = "0.1.37"
25+
tokio = { version = "1.33.0", features = ["rt-multi-thread", "macros", "net", "time", "sync", "io-util"] }
26+
tokio-util = "0.7.10"
27+
tokio-stream = "0.1.14"
28+
thiserror = "1.0.57"
29+
test-case = "3.1.0"
30+
socket2 = "0.5.5"
31+
serde = "1.0.189"
32+
rand = "0.8.5"
33+
pnet = "0.35.0"
34+
more-asserts = "0.3.1"
35+
metrics = "0.23.0"
36+
educe = { version = "0.6.0", default-features = false, features = ["Debug"] }
37+
delegate = "0.12.0"
38+
ctrlc = { version = "3.4.2", features = ["termination"] }
39+
clap = { version = "4.4.7", features = ["derive"] }
40+
bytes = "1.5.0"
41+
async-trait = "0.1.77"
42+
async-channel = { version = "2.1.1" }
43+
anyhow = "1.0.79"
44+
lightway-core = { path = "./lightway-core" }
45+
lightway-app-utils = { path = "./lightway-app-utils" }

lightway-app-utils/Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@ tokio = [ "dep:tokio", "dep:tokio-stream" ]
1515
io-uring = [ "dep:io-uring", "dep:async-channel", "dep:tokio", "dep:tokio-eventfd" ]
1616

1717
[dependencies]
18-
lightway-core = { path = "../lightway-core" }
18+
lightway-core = { workspace = true }
1919
humantime = "2.1.0"
20-
serde = "1.0.189"
20+
serde = { workspace = true }
2121
serde_with = "3.4.0"
22-
tokio = { version = "1.33.0", features = ["macros", "rt", "sync", "time"], optional = true }
23-
tokio-stream = { version = "0.1.14", optional = true }
24-
clap = { version = "4.4.7", features = ["derive"] }
25-
tracing-subscriber = { version = "0.3.17", features = ["json"] }
26-
tokio-util = "0.7.10"
22+
tokio = { workspace = true, optional = true }
23+
tokio-stream = { workspace = true, optional = true }
24+
clap = { workspace = true }
25+
tracing-subscriber = { workspace = true, features = ["json"] }
26+
tokio-util = { workspace = true }
2727
io-uring = { version = "0.6.3", optional = true }
28-
async-channel = { version = "2.1.1", optional = true }
28+
async-channel = { workspace = true, optional = true }
2929
tokio-eventfd = { version = "0.2.1", optional = true }
30-
anyhow = "1.0.79"
31-
bytes = "1.5.0"
30+
anyhow = { workspace = true }
31+
bytes = { workspace = true }
3232
dashmap = "6.0.1"
33-
thiserror = "1.0.57"
34-
metrics = "0.23.0"
33+
thiserror = { workspace = true }
34+
metrics = { workspace = true }
3535
tun2 = { version = "2.0.3", features = ["async"] }
3636

3737
[[example]]
3838
name = "udprelay"
3939
path = "examples/udprelay.rs"
4040

4141
[dev-dependencies]
42-
async-trait = "0.1.77"
43-
pnet = "0.35.0"
42+
async-trait = { workspace = true }
43+
pnet = { workspace = true }
4444
tokio-tun = "0.11.2"

lightway-client/Cargo.toml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ postquantum = ["lightway-core/postquantum"]
1515
io-uring = ["lightway-app-utils/io-uring"]
1616

1717
[dependencies]
18-
lightway-core = { path = "../lightway-core" }
19-
lightway-app-utils = { path = "../lightway-app-utils" }
20-
tokio = { version = "1.31.0", features = ["rt-multi-thread", "macros", "net", "time", "io-util"] }
21-
clap = { version = "4.4.1", features = ["derive"] }
22-
anyhow = "1.0.75"
23-
async-trait = "0.1.73"
24-
bytes = "1.4.0"
25-
serde = { version = "1.0.189", features = ["derive"] }
26-
tracing-subscriber = { version = "0.3.17" }
27-
tracing = "0.1.37"
28-
tokio-stream = { version = "0.1.14", features = ["time"] }
29-
twelf = { version = "0.15.0", default-features = false, features = ["env", "clap", "yaml"]}
30-
socket2 = "0.5.5"
18+
lightway-core = { workspace = true }
19+
lightway-app-utils = { workspace = true }
20+
tokio = { workspace = true }
21+
clap = { workspace = true }
22+
anyhow = { workspace = true }
23+
async-trait = { workspace = true }
24+
bytes = { workspace = true }
25+
serde = { workspace = true, features = ["derive"] }
26+
tracing-subscriber = { workspace = true}
27+
tracing = { workspace = true }
28+
tokio-stream = { workspace = true, features = ["time"] }
29+
twelf = { workspace = true }
30+
socket2 = { workspace = true }
3131
bytesize = { version = "1.3.0", features = ["serde"] }
3232
libc = "0.2.152"
3333
futures = "0.3.30"
34-
tokio-util = "0.7.10"
35-
ctrlc = { version = "3.4.2", features = ["termination"] }
36-
pnet = "0.35.0"
37-
educe = { version = "0.6.0", default-features = false, features = ["Debug"] }
34+
tokio-util = { workspace = true }
35+
ctrlc = { workspace = true }
36+
pnet = { workspace = true }
37+
educe = { workspace = true }
3838

3939
[dev-dependencies]
40-
more-asserts = "0.3.1"
40+
more-asserts = { workspace = true }

lightway-core/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ fuzzing_api = []
1717
postquantum = ["wolfssl/postquantum"]
1818

1919
[dependencies]
20-
bytes = "1.4.0"
20+
bytes = { workspace = true }
2121
num_enum = "0.7.0"
22-
thiserror = "1.0.47"
23-
more-asserts = "0.3.1"
22+
thiserror = { workspace = true }
23+
more-asserts = { workspace = true }
2424
wolfssl = { git = "https://github.com/expressvpn/wolfssl-rs", default-features = false }
25-
rand = "0.8.5"
25+
rand = { workspace = true }
2626
rand_core = "0.6.4"
27-
tracing = "0.1.37"
28-
pnet = "0.35.0"
29-
delegate = "0.12.0"
27+
tracing = { workspace = true }
28+
pnet = { workspace = true }
29+
delegate = { workspace = true }
3030
lru = "0.12.1"
3131
once_cell = "1.19.0"
32-
metrics = "0.23.0"
32+
metrics = { workspace = true }
3333
if_chain = "1.0.2"
3434

3535
[dev-dependencies]
36-
async-trait = "0.1.73"
37-
test-case = "3.1.0"
36+
async-trait = { workspace = true }
37+
test-case = { workspace = true }
3838
itertools = "0.13.0"
39-
tokio = { version = "1.31.0", features = ["rt-multi-thread", "macros", "net", "time", "sync", "io-util"] }
40-
tokio-stream = { version = "0.1.14" }
41-
lightway-app-utils = { path = "../lightway-app-utils" }
39+
tokio = { workspace = true }
40+
tokio-stream = { workspace = true }
41+
lightway-app-utils = { workspace = true }

lightway-core/fuzz/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ cargo-fuzz = true
1111

1212
[dependencies]
1313
libfuzzer-sys = "0.4"
14-
bytes = "1.4.0"
14+
bytes = { workspace = true }
1515

1616
[dependencies.lightway-core]
17-
path = ".."
17+
workspace = true
1818
features = ["fuzzing_api"]
1919

2020
[[bin]]

lightway-server/Cargo.toml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,32 @@ debug = ["lightway-core/debug"]
1414
io-uring = ["lightway-app-utils/io-uring"]
1515

1616
[dependencies]
17-
lightway-core = { path = "../lightway-core", features = ["postquantum"] }
18-
lightway-app-utils = { path = "../lightway-app-utils" }
19-
tokio = { version = "1.31.0", features = ["rt-multi-thread", "macros", "net", "time", "sync", "io-util"] }
20-
clap = { version = "4.4.1", features = ["derive"] }
21-
anyhow = "1.0.75"
22-
async-trait = "0.1.73"
23-
bytes = "1.4.0"
24-
delegate = "0.12.0"
25-
thiserror = "1.0.48"
26-
tracing-subscriber = { version = "0.3.17", features = ["json"] }
17+
lightway-core = { workspace = true, features = ["postquantum"] }
18+
lightway-app-utils = { workspace = true }
19+
tokio = { workspace = true }
20+
clap = { workspace = true }
21+
anyhow = { workspace = true }
22+
bytes = { workspace = true }
23+
delegate = { workspace = true }
24+
thiserror = { workspace = true }
25+
tracing-subscriber = { workspace = true, features = ["json"] }
2726
tracing-log = "0.2.0"
28-
tracing = "0.1.37"
27+
tracing = { workspace = true }
2928
ipnet = { version = "2.8.0", features = ["serde"]}
30-
metrics = "0.23.0"
29+
metrics = { workspace = true }
3130
metrics-util = "0.17.0"
32-
pnet = "0.35.0"
33-
rand = "0.8.5"
34-
tokio-stream = { version = "0.1.14", features = ["time"] }
31+
pnet = { workspace = true }
32+
rand = { workspace = true }
33+
tokio-stream = { workspace = true, features = ["time"] }
3534
time = "0.3.29"
36-
serde = "1.0.189"
37-
twelf = { version = "0.15.0" , default-features = false, features = ["env", "clap", "yaml"]}
38-
socket2 = "0.5.5"
39-
ctrlc = { version = "3.4.2", features = ["termination"] }
40-
async-channel = "2.1.1"
41-
educe = { version = "0.6.0", default-features = false, features = ["Debug"] }
35+
serde = { workspace = true }
36+
twelf = { workspace = true }
37+
socket2 = { workspace = true }
38+
ctrlc = { workspace = true }
39+
async-trait = { workspace = true }
40+
async-channel = { workspace = true, optional = true }
41+
educe = { workspace = true }
4242

4343
[dev-dependencies]
44-
more-asserts = "0.3.1"
45-
test-case = "3.2.1"
44+
more-asserts = { workspace = true }
45+
test-case = { workspace = true }

0 commit comments

Comments
 (0)