diff --git a/Cargo.toml b/Cargo.toml index dc9581ca..028a7b87 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] +anyhow = "1.0.79" +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/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 diff --git a/lightway-app-utils/Cargo.toml b/lightway-app-utils/Cargo.toml index c961db6f..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 = { path = "../lightway-core" } +anyhow = { workspace = true } +async-channel = { workspace = true, optional = true } +bytes = { workspace = true } +clap = { workspace = true } +dashmap = "6.0.1" humantime = "2.1.0" -serde = "1.0.189" -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" io-uring = { version = "0.6.3", optional = true } -async-channel = { version = "2.1.1", 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 } -anyhow = "1.0.79" -bytes = "1.5.0" -dashmap = "6.0.1" -thiserror = "1.0.57" -metrics = "0.23.0" +tokio-stream = { workspace = true, optional = true } +tokio-util = { workspace = true } +tracing-subscriber = { workspace = true, features = ["json"] } 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..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 = { 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" +anyhow = { workspace = true } +async-trait = { workspace = true } +bytes = { workspace = true } bytesize = { version = "1.3.0", features = ["serde"] } -libc = "0.2.152" +clap = { workspace = true } +ctrlc = { workspace = true } +educe = { workspace = true } 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"] } +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 = "0.3.1" +more-asserts = { workspace = true } diff --git a/lightway-core/Cargo.toml b/lightway-core/Cargo.toml index 1eac923d..0ea15c10 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" -num_enum = "0.7.0" -thiserror = "1.0.47" -more-asserts = "0.3.1" -wolfssl = { git = "https://github.com/expressvpn/wolfssl-rs", default-features = false } -rand = "0.8.5" -rand_core = "0.6.4" -tracing = "0.1.37" -pnet = "0.35.0" -delegate = "0.12.0" +bytes = { workspace = true } +delegate = { workspace = true } +if_chain = "1.0.2" lru = "0.12.1" +metrics = { workspace = true } +more-asserts = { workspace = true } +num_enum = "0.7.0" once_cell = "1.19.0" -metrics = "0.23.0" -if_chain = "1.0.2" +pnet = { workspace = true } +rand = { workspace = true } +rand_core = "0.6.4" +thiserror = { workspace = true } +tracing = { workspace = true } +wolfssl = { git = "https://github.com/expressvpn/wolfssl-rs", default-features = false } [dev-dependencies] -async-trait = "0.1.73" -test-case = "3.1.0" +async-trait = { 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" } +lightway-app-utils = { workspace = true } +test-case = { workspace = true } +tokio = { workspace = true } +tokio-stream = { 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..786300ee 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"] } -tracing-log = "0.2.0" -tracing = "0.1.37" +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 } +educe = { workspace = true } ipnet = { version = "2.8.0", features = ["serde"]} -metrics = "0.23.0" +lightway-app-utils = { workspace = true } +lightway-core = { workspace = true, features = ["postquantum"] } +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 } +serde = { workspace = true } +socket2 = { workspace = true } +thiserror = { workspace = true } 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"] } +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 = "0.3.1" -test-case = "3.2.1" +more-asserts = { workspace = true } +test-case = { workspace = true }