diff --git a/Cargo.toml b/Cargo.toml index cddc19c190..beb9aceb3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,10 @@ license = "MIT OR Apache-2.0" # https://firefox-source-docs.mozilla.org/writing-rust-code/update-policy.html#schedule rust-version = "1.74.0" +[workspace.dependencies] +log = { version = "0.4", default-features = false } +qlog = { version = "0.13", default-features = false } + [workspace.lints.clippy] pedantic = { level = "warn", priority = -1 } diff --git a/neqo-bin/Cargo.toml b/neqo-bin/Cargo.toml index a165a4ac32..145f7ac386 100644 --- a/neqo-bin/Cargo.toml +++ b/neqo-bin/Cargo.toml @@ -28,13 +28,13 @@ clap = { version = "4.4", default-features = false, features = ["std", "color", clap-verbosity-flag = { version = "2.2", default-features = false } futures = { version = "0.3", default-features = false, features = ["alloc"] } hex = { version = "0.4", default-features = false, features = ["std"] } -log = { version = "0.4", default-features = false } +log = { workspace = true } neqo-common = { path = "./../neqo-common" } neqo-crypto = { path = "./../neqo-crypto" } neqo-http3 = { path = "./../neqo-http3" } neqo-qpack = { path = "./../neqo-qpack" } neqo-transport = { path = "./../neqo-transport" } -qlog = { version = "0.12", default-features = false } +qlog = { workspace = true } quinn-udp = { git = "https://github.com/quinn-rs/quinn/", rev = "a947962131aba8a6521253d03cc948b20098a2d6" } regex = { version = "1.9", default-features = false, features = ["unicode-perl"] } tokio = { version = "1", default-features = false, features = ["net", "time", "macros", "rt", "rt-multi-thread"] } diff --git a/neqo-common/Cargo.toml b/neqo-common/Cargo.toml index 069d67b834..5d8383614f 100644 --- a/neqo-common/Cargo.toml +++ b/neqo-common/Cargo.toml @@ -16,8 +16,8 @@ workspace = true # Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08 enum-map = { version = "2.7", default-features = false } env_logger = { version = "0.10", default-features = false } -log = { version = "0.4", default-features = false } -qlog = { version = "0.12", default-features = false } +log = { workspace = true } +qlog = { workspace = true } time = { version = "0.3", default-features = false, features = ["formatting"] } [dev-dependencies] diff --git a/neqo-crypto/Cargo.toml b/neqo-crypto/Cargo.toml index 47337d99c0..aae7c19644 100644 --- a/neqo-crypto/Cargo.toml +++ b/neqo-crypto/Cargo.toml @@ -14,7 +14,7 @@ workspace = true [dependencies] # Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08 -log = { version = "0.4", default-features = false } +log = { workspace = true } neqo-common = { path = "../neqo-common" } [build-dependencies] diff --git a/neqo-http3/Cargo.toml b/neqo-http3/Cargo.toml index 27f43fd93f..1edc590329 100644 --- a/neqo-http3/Cargo.toml +++ b/neqo-http3/Cargo.toml @@ -14,12 +14,12 @@ workspace = true [dependencies] # Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08 enumset = { version = "1.1", default-features = false } -log = { version = "0.4", default-features = false } +log = { workspace = true } neqo-common = { path = "./../neqo-common" } neqo-crypto = { path = "./../neqo-crypto" } neqo-qpack = { path = "./../neqo-qpack" } neqo-transport = { path = "./../neqo-transport" } -qlog = { version = "0.12", default-features = false } +qlog = { workspace = true } sfv = { version = "0.9", default-features = false } smallvec = { version = "1.11", default-features = false } url = { version = "2.5", default-features = false } diff --git a/neqo-qpack/Cargo.toml b/neqo-qpack/Cargo.toml index c3e2ab8a66..a221c854ae 100644 --- a/neqo-qpack/Cargo.toml +++ b/neqo-qpack/Cargo.toml @@ -13,11 +13,11 @@ workspace = true [dependencies] # Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08 -log = { version = "0.4", default-features = false } +log = { workspace = true } neqo-common = { path = "./../neqo-common" } neqo-crypto = { path = "./../neqo-crypto" } neqo-transport = { path = "./../neqo-transport" } -qlog = { version = "0.12", default-features = false } +qlog = { workspace = true } static_assertions = { version = "1.1", default-features = false } [dev-dependencies] diff --git a/neqo-transport/Cargo.toml b/neqo-transport/Cargo.toml index 29c8046870..f57e8e2219 100644 --- a/neqo-transport/Cargo.toml +++ b/neqo-transport/Cargo.toml @@ -15,10 +15,10 @@ workspace = true # Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08 enum-map = { version = "2.7", default-features = false } indexmap = { version = "1.9", default-features = false } -log = { version = "0.4", default-features = false } +log = { workspace = true } neqo-common = { path = "../neqo-common" } neqo-crypto = { path = "../neqo-crypto" } -qlog = { version = "0.12", default-features = false } +qlog = { workspace = true } smallvec = { version = "1.11", default-features = false } [dev-dependencies] diff --git a/neqo-transport/src/qlog.rs b/neqo-transport/src/qlog.rs index 35ed00b6e4..fa1d56815c 100644 --- a/neqo-transport/src/qlog.rs +++ b/neqo-transport/src/qlog.rs @@ -390,10 +390,14 @@ pub fn metrics_updated(qlog: &mut NeqoQlog, updated_metrics: &[QlogMetric]) { impl From<&Frame<'_>> for QuicFrame { fn from(frame: &Frame) -> Self { match frame { - // TODO: Add payload length to `QuicFrame::Padding` once - // https://github.com/cloudflare/quiche/pull/1745 is available via the qlog crate. - Frame::Padding { .. } => QuicFrame::Padding, - Frame::Ping => QuicFrame::Ping, + Frame::Padding(len) => QuicFrame::Padding { + length: None, + payload_length: u32::from(*len), + }, + Frame::Ping => QuicFrame::Ping { + length: None, + payload_length: None, + }, Frame::Ack { largest_acknowledged, ack_delay, @@ -419,6 +423,8 @@ impl From<&Frame<'_>> for QuicFrame { ect1: ecn_count.map(|c| c[IpTosEcn::Ect1]), ect0: ecn_count.map(|c| c[IpTosEcn::Ect0]), ce: ecn_count.map(|c| c[IpTosEcn::Ce]), + length: None, + payload_length: None, } } Frame::ResetStream { @@ -429,6 +435,8 @@ impl From<&Frame<'_>> for QuicFrame { stream_id: stream_id.as_u64(), error_code: *application_error_code, final_size: *final_size, + length: None, + payload_length: None, }, Frame::StopSending { stream_id, @@ -436,6 +444,8 @@ impl From<&Frame<'_>> for QuicFrame { } => QuicFrame::StopSending { stream_id: stream_id.as_u64(), error_code: *application_error_code, + length: None, + payload_length: None, }, Frame::Crypto { offset, data } => QuicFrame::Crypto { offset: *offset, diff --git a/test-fixture/Cargo.toml b/test-fixture/Cargo.toml index 9de2a24cce..fe1976f0ed 100644 --- a/test-fixture/Cargo.toml +++ b/test-fixture/Cargo.toml @@ -13,13 +13,13 @@ workspace = true [dependencies] # Sync with https://searchfox.org/mozilla-central/source/Cargo.lock 2024-02-08 -log = { version = "0.4", default-features = false } +log = { workspace = true } neqo-common = { path = "../neqo-common" } neqo-crypto = { path = "../neqo-crypto" } neqo-http3 = { path = "../neqo-http3" } neqo-qpack = { path = "../neqo-qpack" } neqo-transport = { path = "../neqo-transport" } -qlog = { version = "0.12", default-features = false } +qlog = { workspace = true } [features] bench = []