diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5381e069..ef54e54a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -282,9 +282,9 @@ jobs: run: rustup toolchain install nightly-2026-07-15 --profile minimal # The wire and live features are part of the snapshotted surface, and - # quiche builds BoringSSL through cmake. + # quiche builds BoringSSL through cmake and bindgen needs clang. - name: Install native build tools - run: sh tools/ci_apt_install.sh cmake openssl + run: sh tools/ci_apt_install.sh clang cmake openssl - name: Compare public API snapshots run: python3 tools/check_public_api.py @@ -326,9 +326,10 @@ jobs: - name: Install pinned Rust toolchain run: rustup toolchain install 1.88.0 --profile minimal --component clippy - # quiche builds BoringSSL, and the tests generate their own certificate. + # quiche builds BoringSSL through bindgen and cmake, and the tests + # generate their own certificate. - name: Install native build tools - run: sh tools/ci_apt_install.sh cmake openssl + run: sh tools/ci_apt_install.sh clang cmake openssl - name: Fingerprint native toolchain id: quiche-toolchain @@ -623,11 +624,11 @@ jobs: - name: Install pinned Rust toolchain run: rustup toolchain install 1.88.0 --profile minimal - # openssl beside cmake: the suite's credentials() shells out to the - # openssl binary for its test certificate, and the baseline run pays for - # the whole job if the runner image stops carrying it. + # openssl beside clang and cmake: the suite's credentials() shells out + # to the openssl binary for its test certificate, and the baseline run + # pays for the whole job if the runner image stops carrying it. - name: Install native build tools - run: sh tools/ci_apt_install.sh cmake openssl + run: sh tools/ci_apt_install.sh clang cmake openssl - name: Restore pinned tool binaries uses: actions/cache@v6.1.0 @@ -737,9 +738,9 @@ jobs: - name: Install pinned Rust toolchain run: rustup toolchain install 1.88.0 --profile minimal - # quiche builds BoringSSL through cmake. + # quiche builds BoringSSL through cmake and bindgen needs clang. - name: Install native build tools - run: sh tools/ci_apt_install.sh cmake + run: sh tools/ci_apt_install.sh clang cmake - name: Restore pinned tool binaries uses: actions/cache@v6.1.0 diff --git a/Cargo.lock b/Cargo.lock index b1368239..3f0e0c87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + [[package]] name = "aligned-vec" version = "0.6.4" @@ -438,6 +447,24 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "itertools", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex 1.3.0", + "syn 2.0.119", +] + [[package]] name = "bit-vec" version = "0.9.1" @@ -485,6 +512,31 @@ dependencies = [ "hybrid-array", ] +[[package]] +name = "boring" +version = "4.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0e3bc837369e9e662d3845c374ac3771b054d4bc2dee5457591198d16d684c" +dependencies = [ + "bitflags", + "boring-sys", + "foreign-types", + "libc", + "openssl-macros", +] + +[[package]] +name = "boring-sys" +version = "4.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15aad385759d3da2737772aefb391332227bef7cb71fb85c106cadd9d1e63a98" +dependencies = [ + "bindgen", + "cmake", + "fs_extra", + "fslock", +] + [[package]] name = "bumpalo" version = "3.20.3" @@ -544,7 +596,16 @@ dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex", + "shlex 2.0.1", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", ] [[package]] @@ -559,6 +620,17 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" +[[package]] +name = "clang-sys" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "cmake" version = "0.1.58" @@ -739,6 +811,12 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" +[[package]] +name = "debug_panic" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9377eb110cece2e9431deb8d7d2ec8c116510b896741f9f2bf02b352147aa2a6" + [[package]] name = "der" version = "0.7.10" @@ -935,6 +1013,33 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -960,6 +1065,16 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "fslock" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "futures-channel" version = "0.3.33" @@ -1031,6 +1146,12 @@ dependencies = [ "r-efi", ] +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + [[package]] name = "h2" version = "0.4.16" @@ -1348,6 +1469,15 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -1387,6 +1517,16 @@ version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + [[package]] name = "libm" version = "0.2.16" @@ -1563,8 +1703,8 @@ dependencies = [ [[package]] name = "octets" -version = "0.3.4" -source = "git+https://github.com/halideworks/quiche.git?rev=31a2d9c4f11c3a1dd290ad42bf5b9018b4d6f30d#31a2d9c4f11c3a1dd290ad42bf5b9018b4d6f30d" +version = "0.3.6" +source = "git+https://github.com/halideworks/quiche.git?rev=2bb421877826605514a4c21e7315b3439619c35f#2bb421877826605514a4c21e7315b3439619c35f" [[package]] name = "oid-registry" @@ -1587,6 +1727,17 @@ version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "openssl-probe" version = "0.2.1" @@ -1704,12 +1855,15 @@ dependencies = [ [[package]] name = "quiche" -version = "0.24.9" -source = "git+https://github.com/halideworks/quiche.git?rev=31a2d9c4f11c3a1dd290ad42bf5b9018b4d6f30d#31a2d9c4f11c3a1dd290ad42bf5b9018b4d6f30d" +version = "0.29.3" +source = "git+https://github.com/halideworks/quiche.git?rev=2bb421877826605514a4c21e7315b3439619c35f#2bb421877826605514a4c21e7315b3439619c35f" dependencies = [ - "cmake", + "boring", + "bytes", + "debug_panic", "either", "enum_dispatch", + "foreign-types-shared", "intrusive-collections", "libc", "libm", @@ -1758,12 +1912,41 @@ dependencies = [ "yasna", ] +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + [[package]] name = "regex-lite" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + [[package]] name = "ring" version = "0.17.14" @@ -1778,6 +1961,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + [[package]] name = "rustc_version" version = "0.4.1" @@ -1991,6 +2180,12 @@ dependencies = [ "digest 0.11.3", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "shlex" version = "2.0.1" @@ -2907,6 +3102,22 @@ version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c31d56021e873866c968588ed85ccdf56db5c426e44afdb4618c39895104b920" +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.11" @@ -2916,6 +3127,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-link" version = "0.2.1" diff --git a/Cargo.toml b/Cargo.toml index 69254237..9e0c5b75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,8 +22,8 @@ unsafe_code = "forbid" all = "warn" pedantic = "warn" -# quiche 0.24.9 plus two changes: the ADR-0028 ack-latency loss floor, and a +# quiche 0.29.3 plus two changes: the ADR-0028 ack-latency loss floor, and a # narrow TLS exporter used to implement ADR-0037 channel binding. Both live in # the maintained fork; this pin dissolves when upstream releases equivalents. [patch.crates-io] -quiche = { git = "https://github.com/halideworks/quiche.git", rev = "31a2d9c4f11c3a1dd290ad42bf5b9018b4d6f30d" } +quiche = { git = "https://github.com/halideworks/quiche.git", rev = "2bb421877826605514a4c21e7315b3439619c35f" } diff --git a/crates/vot-bench-driver/Cargo.toml b/crates/vot-bench-driver/Cargo.toml index 96886314..9ef2d7a8 100644 --- a/crates/vot-bench-driver/Cargo.toml +++ b/crates/vot-bench-driver/Cargo.toml @@ -9,8 +9,8 @@ publish = false [features] default = [] # The quiche backend, which carries the case over a real socket. Off by default -# because it builds BoringSSL through cmake, which costs minutes where the rest -# of this workspace costs seconds. +# because it builds BoringSSL through bindgen and cmake, which costs minutes +# where the rest of this workspace costs seconds. quiche = ["dep:vot-transport-quiche"] # The MsQuic backend, which carries the case over a real socket. Off by default # because it builds MsQuic's bundled C library, which costs minutes. diff --git a/crates/vot-cli/Cargo.toml b/crates/vot-cli/Cargo.toml index 5b20b03b..c05034ad 100644 --- a/crates/vot-cli/Cargo.toml +++ b/crates/vot-cli/Cargo.toml @@ -10,7 +10,7 @@ publish = false default = [] # The socket-owning carrier. Off, the crate builds in seconds and the wire # commands report the feature they need; on, the binary carries a QUIC -# endpoint, and quiche builds BoringSSL through cmake to provide it. +# endpoint, and quiche builds BoringSSL through bindgen and cmake to provide it. wire = ["dep:vot-transport-quiche", "vot-transport-quiche/live", "dep:rcgen"] [dependencies] diff --git a/crates/vot-transport-quiche/Cargo.toml b/crates/vot-transport-quiche/Cargo.toml index 46901823..189cc0f0 100644 --- a/crates/vot-transport-quiche/Cargo.toml +++ b/crates/vot-transport-quiche/Cargo.toml @@ -9,12 +9,12 @@ publish = false [features] default = [] # The pump: a UDP socket, a quiche connection, and the timer that drives loss -# recovery. Off by default because quiche builds BoringSSL through cmake, which -# costs minutes where the rest of this workspace costs seconds. +# recovery. Off by default because quiche builds BoringSSL through bindgen and +# cmake, which costs minutes where the rest of this workspace costs seconds. live = ["dep:quiche", "dep:nix", "dep:vot-platform-net"] [dependencies] -quiche = { version = "=0.24.9", optional = true } +quiche = { version = "=0.29.3", optional = true } vot-codec = { path = "../vot-codec" } vot-transport-api = { path = "../vot-transport-api" } vot-transport-framing = { path = "../vot-transport-framing" } diff --git a/crates/vot-transport-quiche/src/live.rs b/crates/vot-transport-quiche/src/live.rs index 51392a2b..902afd0d 100644 --- a/crates/vot-transport-quiche/src/live.rs +++ b/crates/vot-transport-quiche/src/live.rs @@ -451,9 +451,12 @@ impl Config { let stream_window = u64::try_from(self.limits.control_payload()) .map_err(|_| Error::InvalidConfiguration)? .saturating_add(vot_transport_api::MAX_DATA_RECORD_WIRE_BYTES as u64); - config.set_initial_max_data(stream_window.saturating_mul(8)); - config.set_initial_max_stream_data_bidi_local(stream_window); - config.set_initial_max_stream_data_bidi_remote(stream_window); + let connection_window = stream_window.saturating_mul(8); + config.set_initial_max_data(connection_window); + // The aggregate window remains the memory bound. Let one bulk stream + // use all of it instead of stalling after one eighth of the credit. + config.set_initial_max_stream_data_bidi_local(connection_window); + config.set_initial_max_stream_data_bidi_remote(connection_window); // The control stream plus what was advertised, so a peer opening the // lanes it was promised is never refused by the carrier. let lanes = u64::try_from(self.limits.lanes()).map_err(|_| Error::InvalidConfiguration)?; diff --git a/tools/ci_apt_install.sh b/tools/ci_apt_install.sh index 02ce3997..7cd255d0 100644 --- a/tools/ci_apt_install.sh +++ b/tools/ci_apt_install.sh @@ -15,13 +15,20 @@ test -n "$missing" || exit 0 # Hosted-runner mirrors occasionally accept a connection and stop answering. # Skip apt entirely when the image already has every package. Otherwise bound -# the index refresh, then retry short installs so partial downloads survive a -# stalled mirror instead of one attempt spending the whole job's useful time. -sudo timeout --kill-after=10s 180s apt-get \ - -o Acquire::Retries=3 \ - -o Acquire::http::Timeout=20 \ - -o Acquire::https::Timeout=20 \ - update +# the index refresh and installs per attempt so partial downloads survive a +# stalled mirror instead of one internal retry loop spending the whole job's +# useful time. +for attempt in 1 2 3; do + if sudo timeout --kill-after=10s 120s apt-get \ + -o Acquire::Retries=0 \ + -o Acquire::http::Timeout=20 \ + -o Acquire::https::Timeout=20 \ + update + then + break + fi + test "$attempt" -lt 3 || exit 1 +done for attempt in 1 2 3; do # Package names are fixed workflow inputs; intentional splitting drops the # empty prefix and hands apt only the packages absent from this image.