From 72d83163c77a168ac83a500fc75e5e57400f9f80 Mon Sep 17 00:00:00 2001 From: ExpressVPN Automation Bot <143369453+expressvpn-iat-bot@users.noreply.github.com> Date: Fri, 26 Jul 2024 01:47:08 +0000 Subject: [PATCH 1/3] [auto] Update Rust toolchain to 1.80.0 --- Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Earthfile b/Earthfile index a0f5cdba..2d381a54 100644 --- a/Earthfile +++ b/Earthfile @@ -6,7 +6,7 @@ ARG --global debian = bookworm IMPORT github.com/earthly/lib/rust:a49d2a0f4028cd15666d19904f8fc5fbd0b9ba87 AS lib-rust install-build-dependencies: - FROM rust:1.79.0-$debian + FROM rust:1.80.0-$debian WORKDIR /lightway RUN dpkg --add-architecture arm64 RUN apt-get update -qq From 892cdcf1f5a832d7f541ece79e54df5fe9d1e85b Mon Sep 17 00:00:00 2001 From: Mariappan Ramasamy <142216110+kp-mariappan-ramasamy@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:46:51 +0800 Subject: [PATCH 2/3] cargo: move dependency version to cargo dependency Cargo deny recently added a new feature for checking duplicate dependencies: https://github.com/rust-lang/cargo/issues/12162 This helps to unify all the dependencies from different sub crate to use the same version --- Cargo.toml | 26 ++++++++++++++++++++ lightway-app-utils/Cargo.toml | 28 ++++++++++----------- lightway-client/Cargo.toml | 36 +++++++++++++-------------- lightway-core/Cargo.toml | 26 ++++++++++---------- lightway-core/fuzz/Cargo.toml | 4 +-- lightway-server/Cargo.toml | 46 +++++++++++++++++------------------ 6 files changed, 96 insertions(+), 70 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dc9581ca..a8dd7c5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,3 +17,29 @@ debug = 1 [workspace.lints.clippy] undocumented_unsafe_blocks = "deny" unsafe_code = "deny" + +[workspace.dependencies] +twelf = { version = "0.15.0", default-features = false, features = ["env", "clap", "yaml"]} +tracing-subscriber = "0.3.17" +tracing = "0.1.37" +tokio = { version = "1.33.0", features = ["rt-multi-thread", "macros", "net", "time", "sync", "io-util"] } +tokio-util = "0.7.10" +tokio-stream = "0.1.14" +thiserror = "1.0.57" +test-case = "3.1.0" +socket2 = "0.5.5" +serde = "1.0.189" +rand = "0.8.5" +pnet = "0.35.0" +more-asserts = "0.3.1" +metrics = "0.23.0" +educe = { version = "0.6.0", default-features = false, features = ["Debug"] } +delegate = "0.12.0" +ctrlc = { version = "3.4.2", features = ["termination"] } +clap = { version = "4.4.7", features = ["derive"] } +bytes = "1.5.0" +async-trait = "0.1.77" +async-channel = { version = "2.1.1" } +anyhow = "1.0.79" +lightway-core = { path = "./lightway-core" } +lightway-app-utils = { path = "./lightway-app-utils" } diff --git a/lightway-app-utils/Cargo.toml b/lightway-app-utils/Cargo.toml index c961db6f..c184aa4a 100644 --- a/lightway-app-utils/Cargo.toml +++ b/lightway-app-utils/Cargo.toml @@ -15,23 +15,23 @@ tokio = [ "dep:tokio", "dep:tokio-stream" ] io-uring = [ "dep:io-uring", "dep:async-channel", "dep:tokio", "dep:tokio-eventfd" ] [dependencies] -lightway-core = { path = "../lightway-core" } +lightway-core = { workspace = true } humantime = "2.1.0" -serde = "1.0.189" +serde = { workspace = true } serde_with = "3.4.0" -tokio = { version = "1.33.0", features = ["macros", "rt", "sync", "time"], optional = true } -tokio-stream = { version = "0.1.14", optional = true } -clap = { version = "4.4.7", features = ["derive"] } -tracing-subscriber = { version = "0.3.17", features = ["json"] } -tokio-util = "0.7.10" +tokio = { workspace = true, optional = true } +tokio-stream = { workspace = true, optional = true } +clap = { workspace = true } +tracing-subscriber = { workspace = true, features = ["json"] } +tokio-util = { workspace = true } io-uring = { version = "0.6.3", optional = true } -async-channel = { version = "2.1.1", optional = true } +async-channel = { workspace = true, optional = true } tokio-eventfd = { version = "0.2.1", optional = true } -anyhow = "1.0.79" -bytes = "1.5.0" +anyhow = { workspace = true } +bytes = { workspace = true } dashmap = "6.0.1" -thiserror = "1.0.57" -metrics = "0.23.0" +thiserror = { workspace = true } +metrics = { workspace = true } tun2 = { version = "2.0.3", features = ["async"] } [[example]] @@ -39,6 +39,6 @@ name = "udprelay" path = "examples/udprelay.rs" [dev-dependencies] -async-trait = "0.1.77" -pnet = "0.35.0" +async-trait = { workspace = true } +pnet = { workspace = true } tokio-tun = "0.11.2" diff --git a/lightway-client/Cargo.toml b/lightway-client/Cargo.toml index d81de6f0..1ac4ac96 100644 --- a/lightway-client/Cargo.toml +++ b/lightway-client/Cargo.toml @@ -15,26 +15,26 @@ postquantum = ["lightway-core/postquantum"] io-uring = ["lightway-app-utils/io-uring"] [dependencies] -lightway-core = { path = "../lightway-core" } -lightway-app-utils = { path = "../lightway-app-utils" } -tokio = { version = "1.31.0", features = ["rt-multi-thread", "macros", "net", "time", "io-util"] } -clap = { version = "4.4.1", features = ["derive"] } -anyhow = "1.0.75" -async-trait = "0.1.73" -bytes = "1.4.0" -serde = { version = "1.0.189", features = ["derive"] } -tracing-subscriber = { version = "0.3.17" } -tracing = "0.1.37" -tokio-stream = { version = "0.1.14", features = ["time"] } -twelf = { version = "0.15.0", default-features = false, features = ["env", "clap", "yaml"]} -socket2 = "0.5.5" +lightway-core = { workspace = true } +lightway-app-utils = { workspace = true } +tokio = { workspace = true } +clap = { workspace = true } +anyhow = { workspace = true } +async-trait = { workspace = true } +bytes = { workspace = true } +serde = { workspace = true, features = ["derive"] } +tracing-subscriber = { workspace = true} +tracing = { workspace = true } +tokio-stream = { workspace = true, features = ["time"] } +twelf = { workspace = true } +socket2 = { workspace = true } bytesize = { version = "1.3.0", features = ["serde"] } libc = "0.2.152" futures = "0.3.30" -tokio-util = "0.7.10" -ctrlc = { version = "3.4.2", features = ["termination"] } -pnet = "0.35.0" -educe = { version = "0.6.0", default-features = false, features = ["Debug"] } +tokio-util = { workspace = true } +ctrlc = { workspace = true } +pnet = { workspace = true } +educe = { workspace = true } [dev-dependencies] -more-asserts = "0.3.1" +more-asserts = { workspace = true } diff --git a/lightway-core/Cargo.toml b/lightway-core/Cargo.toml index 1eac923d..e21298c3 100644 --- a/lightway-core/Cargo.toml +++ b/lightway-core/Cargo.toml @@ -17,25 +17,25 @@ fuzzing_api = [] postquantum = ["wolfssl/postquantum"] [dependencies] -bytes = "1.4.0" +bytes = { workspace = true } num_enum = "0.7.0" -thiserror = "1.0.47" -more-asserts = "0.3.1" +thiserror = { workspace = true } +more-asserts = { workspace = true } wolfssl = { git = "https://github.com/expressvpn/wolfssl-rs", default-features = false } -rand = "0.8.5" +rand = { workspace = true } rand_core = "0.6.4" -tracing = "0.1.37" -pnet = "0.35.0" -delegate = "0.12.0" +tracing = { workspace = true } +pnet = { workspace = true } +delegate = { workspace = true } lru = "0.12.1" once_cell = "1.19.0" -metrics = "0.23.0" +metrics = { workspace = true } if_chain = "1.0.2" [dev-dependencies] -async-trait = "0.1.73" -test-case = "3.1.0" +async-trait = { workspace = true } +test-case = { workspace = true } itertools = "0.13.0" -tokio = { version = "1.31.0", features = ["rt-multi-thread", "macros", "net", "time", "sync", "io-util"] } -tokio-stream = { version = "0.1.14" } -lightway-app-utils = { path = "../lightway-app-utils" } +tokio = { workspace = true } +tokio-stream = { workspace = true } +lightway-app-utils = { workspace = true } diff --git a/lightway-core/fuzz/Cargo.toml b/lightway-core/fuzz/Cargo.toml index c63c7505..dd29936d 100644 --- a/lightway-core/fuzz/Cargo.toml +++ b/lightway-core/fuzz/Cargo.toml @@ -11,10 +11,10 @@ cargo-fuzz = true [dependencies] libfuzzer-sys = "0.4" -bytes = "1.4.0" +bytes = { workspace = true } [dependencies.lightway-core] -path = ".." +workspace = true features = ["fuzzing_api"] [[bin]] diff --git a/lightway-server/Cargo.toml b/lightway-server/Cargo.toml index 2627ebfe..e722377b 100644 --- a/lightway-server/Cargo.toml +++ b/lightway-server/Cargo.toml @@ -14,32 +14,32 @@ debug = ["lightway-core/debug"] io-uring = ["lightway-app-utils/io-uring"] [dependencies] -lightway-core = { path = "../lightway-core", features = ["postquantum"] } -lightway-app-utils = { path = "../lightway-app-utils" } -tokio = { version = "1.31.0", features = ["rt-multi-thread", "macros", "net", "time", "sync", "io-util"] } -clap = { version = "4.4.1", features = ["derive"] } -anyhow = "1.0.75" -async-trait = "0.1.73" -bytes = "1.4.0" -delegate = "0.12.0" -thiserror = "1.0.48" -tracing-subscriber = { version = "0.3.17", features = ["json"] } +lightway-core = { workspace = true, features = ["postquantum"] } +lightway-app-utils = { workspace = true } +tokio = { workspace = true } +clap = { workspace = true } +anyhow = { workspace = true } +bytes = { workspace = true } +delegate = { workspace = true } +thiserror = { workspace = true } +tracing-subscriber = { workspace = true, features = ["json"] } tracing-log = "0.2.0" -tracing = "0.1.37" +tracing = { workspace = true } ipnet = { version = "2.8.0", features = ["serde"]} -metrics = "0.23.0" +metrics = { workspace = true } metrics-util = "0.17.0" -pnet = "0.35.0" -rand = "0.8.5" -tokio-stream = { version = "0.1.14", features = ["time"] } +pnet = { workspace = true } +rand = { workspace = true } +tokio-stream = { workspace = true, features = ["time"] } time = "0.3.29" -serde = "1.0.189" -twelf = { version = "0.15.0" , default-features = false, features = ["env", "clap", "yaml"]} -socket2 = "0.5.5" -ctrlc = { version = "3.4.2", features = ["termination"] } -async-channel = "2.1.1" -educe = { version = "0.6.0", default-features = false, features = ["Debug"] } +serde = { workspace = true } +twelf = { workspace = true } +socket2 = { workspace = true } +ctrlc = { workspace = true } +async-trait = { workspace = true } +async-channel = { workspace = true, optional = true } +educe = { workspace = true } [dev-dependencies] -more-asserts = "0.3.1" -test-case = "3.2.1" +more-asserts = { workspace = true } +test-case = { workspace = true } From 86f480afda9ff39ad70d36575542d03f543a8a58 Mon Sep 17 00:00:00 2001 From: Mariappan Ramasamy <142216110+kp-mariappan-ramasamy@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:00:04 +0800 Subject: [PATCH 3/3] cargo: sort dependencies for crates alphabetically --- Cargo.toml | 44 +++++++++++++++++------------------ lightway-app-utils/Cargo.toml | 24 +++++++++---------- lightway-client/Cargo.toml | 30 ++++++++++++------------ lightway-core/Cargo.toml | 22 +++++++++--------- lightway-server/Cargo.toml | 30 ++++++++++++------------ 5 files changed, 75 insertions(+), 75 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a8dd7c5a..028a7b87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,27 +19,27 @@ undocumented_unsafe_blocks = "deny" unsafe_code = "deny" [workspace.dependencies] -twelf = { version = "0.15.0", default-features = false, features = ["env", "clap", "yaml"]} -tracing-subscriber = "0.3.17" -tracing = "0.1.37" -tokio = { version = "1.33.0", features = ["rt-multi-thread", "macros", "net", "time", "sync", "io-util"] } -tokio-util = "0.7.10" -tokio-stream = "0.1.14" -thiserror = "1.0.57" -test-case = "3.1.0" -socket2 = "0.5.5" -serde = "1.0.189" -rand = "0.8.5" -pnet = "0.35.0" -more-asserts = "0.3.1" -metrics = "0.23.0" -educe = { version = "0.6.0", default-features = false, features = ["Debug"] } -delegate = "0.12.0" -ctrlc = { version = "3.4.2", features = ["termination"] } -clap = { version = "4.4.7", features = ["derive"] } -bytes = "1.5.0" -async-trait = "0.1.77" -async-channel = { version = "2.1.1" } anyhow = "1.0.79" -lightway-core = { path = "./lightway-core" } +async-channel = { version = "2.1.1" } +async-trait = "0.1.77" +bytes = "1.5.0" +clap = { version = "4.4.7", features = ["derive"] } +ctrlc = { version = "3.4.2", features = ["termination"] } +delegate = "0.12.0" +educe = { version = "0.6.0", default-features = false, features = ["Debug"] } lightway-app-utils = { path = "./lightway-app-utils" } +lightway-core = { path = "./lightway-core" } +metrics = "0.23.0" +more-asserts = "0.3.1" +pnet = "0.35.0" +rand = "0.8.5" +serde = "1.0.189" +socket2 = "0.5.5" +test-case = "3.1.0" +thiserror = "1.0.57" +tokio = { version = "1.33.0", features = ["rt-multi-thread", "macros", "net", "time", "sync", "io-util"] } +tokio-stream = "0.1.14" +tokio-util = "0.7.10" +tracing = "0.1.37" +tracing-subscriber = "0.3.17" +twelf = { version = "0.15.0", default-features = false, features = ["env", "clap", "yaml"]} diff --git a/lightway-app-utils/Cargo.toml b/lightway-app-utils/Cargo.toml index c184aa4a..7e5d50c0 100644 --- a/lightway-app-utils/Cargo.toml +++ b/lightway-app-utils/Cargo.toml @@ -11,27 +11,27 @@ readme = "README.md" [features] default = [ "tokio" ] -tokio = [ "dep:tokio", "dep:tokio-stream" ] io-uring = [ "dep:io-uring", "dep:async-channel", "dep:tokio", "dep:tokio-eventfd" ] +tokio = [ "dep:tokio", "dep:tokio-stream" ] [dependencies] -lightway-core = { workspace = true } +anyhow = { workspace = true } +async-channel = { workspace = true, optional = true } +bytes = { workspace = true } +clap = { workspace = true } +dashmap = "6.0.1" humantime = "2.1.0" +io-uring = { version = "0.6.3", optional = true } +lightway-core = { workspace = true } +metrics = { workspace = true } serde = { workspace = true } serde_with = "3.4.0" +thiserror = { workspace = true } tokio = { workspace = true, optional = true } +tokio-eventfd = { version = "0.2.1", optional = true } tokio-stream = { workspace = true, optional = true } -clap = { workspace = true } -tracing-subscriber = { workspace = true, features = ["json"] } tokio-util = { workspace = true } -io-uring = { version = "0.6.3", optional = true } -async-channel = { workspace = true, optional = true } -tokio-eventfd = { version = "0.2.1", optional = true } -anyhow = { workspace = true } -bytes = { workspace = true } -dashmap = "6.0.1" -thiserror = { workspace = true } -metrics = { workspace = true } +tracing-subscriber = { workspace = true, features = ["json"] } tun2 = { version = "2.0.3", features = ["async"] } [[example]] diff --git a/lightway-client/Cargo.toml b/lightway-client/Cargo.toml index 1ac4ac96..f7e87915 100644 --- a/lightway-client/Cargo.toml +++ b/lightway-client/Cargo.toml @@ -11,30 +11,30 @@ license = "GPL-2.0-only" [features] default = ["postquantum", "io-uring"] debug = ["lightway-core/debug"] -postquantum = ["lightway-core/postquantum"] io-uring = ["lightway-app-utils/io-uring"] +postquantum = ["lightway-core/postquantum"] [dependencies] -lightway-core = { workspace = true } -lightway-app-utils = { workspace = true } -tokio = { workspace = true } -clap = { workspace = true } anyhow = { workspace = true } async-trait = { workspace = true } bytes = { workspace = true } -serde = { workspace = true, features = ["derive"] } -tracing-subscriber = { workspace = true} -tracing = { workspace = true } -tokio-stream = { workspace = true, features = ["time"] } -twelf = { workspace = true } -socket2 = { workspace = true } bytesize = { version = "1.3.0", features = ["serde"] } -libc = "0.2.152" -futures = "0.3.30" -tokio-util = { workspace = true } +clap = { workspace = true } ctrlc = { workspace = true } -pnet = { workspace = true } educe = { workspace = true } +futures = "0.3.30" +libc = "0.2.152" +lightway-app-utils = { workspace = true } +lightway-core = { workspace = true } +pnet = { workspace = true } +serde = { workspace = true, features = ["derive"] } +socket2 = { workspace = true } +tokio = { workspace = true } +tokio-stream = { workspace = true, features = ["time"] } +tokio-util = { workspace = true } +tracing = { workspace = true } +tracing-subscriber = { workspace = true} +twelf = { workspace = true } [dev-dependencies] more-asserts = { workspace = true } diff --git a/lightway-core/Cargo.toml b/lightway-core/Cargo.toml index e21298c3..0ea15c10 100644 --- a/lightway-core/Cargo.toml +++ b/lightway-core/Cargo.toml @@ -18,24 +18,24 @@ postquantum = ["wolfssl/postquantum"] [dependencies] bytes = { workspace = true } -num_enum = "0.7.0" -thiserror = { workspace = true } +delegate = { workspace = true } +if_chain = "1.0.2" +lru = "0.12.1" +metrics = { workspace = true } more-asserts = { workspace = true } -wolfssl = { git = "https://github.com/expressvpn/wolfssl-rs", default-features = false } +num_enum = "0.7.0" +once_cell = "1.19.0" +pnet = { workspace = true } rand = { workspace = true } rand_core = "0.6.4" +thiserror = { workspace = true } tracing = { workspace = true } -pnet = { workspace = true } -delegate = { workspace = true } -lru = "0.12.1" -once_cell = "1.19.0" -metrics = { workspace = true } -if_chain = "1.0.2" +wolfssl = { git = "https://github.com/expressvpn/wolfssl-rs", default-features = false } [dev-dependencies] async-trait = { workspace = true } -test-case = { workspace = true } itertools = "0.13.0" +lightway-app-utils = { workspace = true } +test-case = { workspace = true } tokio = { workspace = true } tokio-stream = { workspace = true } -lightway-app-utils = { workspace = true } diff --git a/lightway-server/Cargo.toml b/lightway-server/Cargo.toml index e722377b..786300ee 100644 --- a/lightway-server/Cargo.toml +++ b/lightway-server/Cargo.toml @@ -14,31 +14,31 @@ debug = ["lightway-core/debug"] io-uring = ["lightway-app-utils/io-uring"] [dependencies] -lightway-core = { workspace = true, features = ["postquantum"] } -lightway-app-utils = { workspace = true } -tokio = { workspace = true } -clap = { workspace = true } anyhow = { workspace = true } +async-channel = { workspace = true, optional = true } +async-trait = { workspace = true } bytes = { workspace = true } +clap = { workspace = true } +ctrlc = { workspace = true } delegate = { workspace = true } -thiserror = { workspace = true } -tracing-subscriber = { workspace = true, features = ["json"] } -tracing-log = "0.2.0" -tracing = { workspace = true } +educe = { workspace = true } ipnet = { version = "2.8.0", features = ["serde"]} +lightway-app-utils = { workspace = true } +lightway-core = { workspace = true, features = ["postquantum"] } metrics = { workspace = true } metrics-util = "0.17.0" pnet = { workspace = true } rand = { workspace = true } -tokio-stream = { workspace = true, features = ["time"] } -time = "0.3.29" serde = { workspace = true } -twelf = { workspace = true } socket2 = { workspace = true } -ctrlc = { workspace = true } -async-trait = { workspace = true } -async-channel = { workspace = true, optional = true } -educe = { workspace = true } +thiserror = { workspace = true } +time = "0.3.29" +tokio = { workspace = true } +tokio-stream = { workspace = true, features = ["time"] } +tracing = { workspace = true } +tracing-log = "0.2.0" +tracing-subscriber = { workspace = true, features = ["json"] } +twelf = { workspace = true } [dev-dependencies] more-asserts = { workspace = true }