From b434b90770c47cca01cbbe242966c080f744d628 Mon Sep 17 00:00:00 2001 From: Zac Shenker Date: Sun, 18 Oct 2026 12:07:08 -0600 Subject: [PATCH 1/7] quest(m2): plan an async QUIC driver without moq-net Co-Authored-By: Claude Opus 5.5 --- quest/m2/README.md | 1 + quest/m2/quic-driver.md | 66 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 quest/m2/quic-driver.md diff --git a/quest/m2/README.md b/quest/m2/README.md index 0b4c6a04840..2bbac3c2871 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -106,6 +106,7 @@ ranked just below deterministic TS legs, which it requires. - [qmux on the QUIC stream state machine](/quest/m2/quic-qmux.md) - qmux is a first-class crate over `moq-quic`'s shared stream state machine - [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) - every backend implements moq-net's `transport::poll` traits, and the generic `web_transport_trait` adapters are deleted +- [An async QUIC driver without moq-net](/quest/m2/quic-driver.md) - `moq_tokio::quic::driver` becomes usable without moq-net, so other applications can embed moq-quic on tokio - [Measure ECN on the backbone](/quest/m2/quic-ecn-measure.md) - a written verdict on marking versus dropping, and whether Linode and OVH keep marks - [poll_acked on moq-net's send stream](/quest/m2/quic-ack-hook.md) - the diff --git a/quest/m2/quic-driver.md b/quest/m2/quic-driver.md new file mode 100644 index 00000000000..2e918712792 --- /dev/null +++ b/quest/m2/quic-driver.md @@ -0,0 +1,66 @@ +# [M] An async QUIC driver without moq-net + +## Goal + +An application runs `moq-quic` on tokio without depending on moq-net: the +endpoint, connection, and stream futures in `moq_tokio::quic::driver` today, +with send groups, `reset_at`, receive leases, and live `Limits`. Any Rust MoQ +implementation, or any QUIC application, can embed the stack moq-dev ships, +instead of forking quinn's async layer again. moq-tokio keeps its API by +re-exporting the driver. + +`cargo tree -e normal` on the driver shows no moq-net, kio-based model, or +moq-lite code. The driver's tests move with it and stay in the merge gate. + +## Plan + +Where it stands: + +- The driver is quinn's async layer on moq-quic, kept as moq-tokio modules, + tokio-only (decided 2026-10-06 in the fork epic, over `moq-quic-udp` and + `moq-quic-tokio` crates). The udp half is now `moq_sock::udp`. +- Its only moq-net type is `moq_net::transport::Wire`, a pair of byte + counters (`quic/driver/connection.rs`). `quic/backend.rs` also takes + `moq_net::Versions` for ALPN lists, but sits above the driver. +- moq-net is a required dependency of moq-tokio, and + `--no-default-features` does not compile (#2979), so a consumer cannot + take the driver alone. +- [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) moves + `quic::web` onto moq-net's `transport::poll` traits and asks whether + `driver` and `web` should become private. + +Decide before the next breaking cut, because that cut publishes moq-quic and +the driver for the first time. Moving the driver after publication costs every +consumer a second break. + +Options: + +1. **A `moq-quic-tokio` crate (recommended).** The driver moves out of + moq-tokio unchanged, and moq-tokio depends on it and re-exports + `quic::driver`. Clean layering: sans-IO core, then the tokio runtime, then + the MoQ backends. Reverses the 2026-10-06 crate decision for the async + layer only; quinn-udp stays a moq-sock module. +2. **A `tokio` feature on moq-quic.** No new crate. But the gate would cover + the driver's logic, not just a dependency, so its tests leave the default + merge gate, against `rs/AGENTS.md`. +3. **Keep it in moq-tokio, with moq-net behind a default feature.** The + smallest move, but it needs #2979 fixed and keeps every moq-tokio + dependency in a driver-only build. + +In every option: + +- First, a separate PR replaces `Wire` with counters owned by the driver. + moq-tokio converts at its boundary, and moq-net's wire stats do not change. +- `quic::web` and `quic::backend` stay in moq-tokio, and + [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) proceeds + as planned on top. The driver stays public. +- moq-uring's driver is out of scope. It is `!Send`, and coupled to moq-net + through `server::Activity` as well as `Wire`. +- Land after the receive-lease PR (#5878), which rewrites the driver's receive + path. +- Publish the driver crate, if option 1, with moq-quic, moq-sock and moq-clock + in the same release. + +To settle with the maintainer: the option, the crate name, and whether the +decision belongs in m1, since it shapes what the cut publishes, while the move +itself stays m2. From 41ac821dd4e9c1e2ea6b25d956a428c4014e9af2 Mon Sep 17 00:00:00 2001 From: Zac Shenker Date: Sun, 18 Oct 2026 12:22:16 -0600 Subject: [PATCH 2/7] quest(m2): the driver is gated by quic, not blocked by #2979 Co-Authored-By: Claude Opus 5.5 --- quest/m2/quic-driver.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/quest/m2/quic-driver.md b/quest/m2/quic-driver.md index 2e918712792..76b22dd4a05 100644 --- a/quest/m2/quic-driver.md +++ b/quest/m2/quic-driver.md @@ -22,9 +22,8 @@ Where it stands: - Its only moq-net type is `moq_net::transport::Wire`, a pair of byte counters (`quic/driver/connection.rs`). `quic/backend.rs` also takes `moq_net::Versions` for ALPN lists, but sits above the driver. -- moq-net is a required dependency of moq-tokio, and - `--no-default-features` does not compile (#2979), so a consumer cannot - take the driver alone. +- moq-net is a required dependency of moq-tokio, even without the `quic` + feature that gates the driver, so a consumer cannot take the driver alone. - [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) moves `quic::web` onto moq-net's `transport::poll` traits and asks whether `driver` and `web` should become private. @@ -44,8 +43,9 @@ Options: the driver's logic, not just a dependency, so its tests leave the default merge gate, against `rs/AGENTS.md`. 3. **Keep it in moq-tokio, with moq-net behind a default feature.** The - smallest move, but it needs #2979 fixed and keeps every moq-tokio - dependency in a driver-only build. + smallest move, but every moq-net use in moq-tokio needs a gate, and a + driver-only build keeps the `quic` feature's other dependencies, such as + reqwest and notify. In every option: From ae5dca645190b050a9c79c3ef70cbe57706c08e8 Mon Sep 17 00:00:00 2001 From: Zac Shenker Date: Sun, 18 Oct 2026 16:28:50 -0600 Subject: [PATCH 3/7] quest(m2): what moving the driver into its own crate has to settle Co-Authored-By: Claude Opus 5.5 --- quest/m2/quic-driver.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/quest/m2/quic-driver.md b/quest/m2/quic-driver.md index 76b22dd4a05..3fffffbdc2c 100644 --- a/quest/m2/quic-driver.md +++ b/quest/m2/quic-driver.md @@ -38,7 +38,16 @@ Options: moq-tokio unchanged, and moq-tokio depends on it and re-exports `quic::driver`. Clean layering: sans-IO core, then the tokio runtime, then the MoQ backends. Reverses the 2026-10-06 crate decision for the async - layer only; quinn-udp stays a moq-sock module. + layer only; quinn-udp stays a moq-sock module. A trial extraction moved + the module as-is: once `Wire` became driver-owned counters, the driver's + tests passed unchanged. What the move has to settle: + - The crate depends on moq-quic, `moq_sock::udp`, and moq-clock with its + `runtime` feature, since the connection's timer is `moq_clock::Sleep`. + - `runtime::send_failed` and `wrap_udp_socket` are `pub(crate)` helpers + that `quic::backend` and `quic::web`'s tests call, so they become + public API or move. + - Shorter paths let rustfmt re-wrap about 50 lines of `tests.rs`. Keep + that churn out of the move commit, so quinn cherry-picks still apply. 2. **A `tokio` feature on moq-quic.** No new crate. But the gate would cover the driver's logic, not just a dependency, so its tests leave the default merge gate, against `rs/AGENTS.md`. From 4a9984408601a0359c17bb3b1d323896922dd6e7 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 20 Oct 2026 13:07:01 -0700 Subject: [PATCH 4/7] quest(m2): align the QUIC driver with the moq-quic direction The driver is moq-quic's tokio runtime, so the quest moves in-tree code only and adds no quinn, noq, or web-transport dependency. Keep it in m2, since the cut ships the driver hidden, and record option 1 as provisional until the maintainer decides. The Wire change becomes the first commit, and Drop web-transport-trait's open question now covers only quic::web. Co-Authored-By: Claude Opus 5.5 --- quest/m2/drop-web-transport-trait.md | 6 ++- quest/m2/quic-driver.md | 55 ++++++++++++++++------------ 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/quest/m2/drop-web-transport-trait.md b/quest/m2/drop-web-transport-trait.md index 2ecd247b489..a55a25a4db5 100644 --- a/quest/m2/drop-web-transport-trait.md +++ b/quest/m2/drop-web-transport-trait.md @@ -45,8 +45,10 @@ each gets its own impl: `SendOptions` reach a new stream through its setters in both runtimes' adapters. A native impl can pass them to the open, as moq-tokio's driver `open_uni`/`open_bi` already accept. -- moq-tokio's `quic::driver` and `quic::web` modules are public but - `#[doc(hidden)]`. Decide whether they are API or should be private. +- moq-tokio's `quic::web` module is public but `#[doc(hidden)]`. Decide + whether it is API or should be private. `quic::driver` stays public: + [An async QUIC driver without moq-net](/quest/m2/quic-driver.md) makes it + supported API. Notes from related quests: - [qmux on moq-quic](/quest/m2/quic-qmux.md) planned to port qmux's diff --git a/quest/m2/quic-driver.md b/quest/m2/quic-driver.md index 3fffffbdc2c..1b523c3f8e9 100644 --- a/quest/m2/quic-driver.md +++ b/quest/m2/quic-driver.md @@ -10,7 +10,8 @@ instead of forking quinn's async layer again. moq-tokio keeps its API by re-exporting the driver. `cargo tree -e normal` on the driver shows no moq-net, kio-based model, or -moq-lite code. The driver's tests move with it and stay in the merge gate. +moq-lite code, and no crate from quinn, noq, or moq-dev/web-transport. The +driver's tests move with it and stay in the merge gate. ## Plan @@ -24,23 +25,28 @@ Where it stands: `moq_net::Versions` for ALPN lists, but sits above the driver. - moq-net is a required dependency of moq-tokio, even without the `quic` feature that gates the driver, so a consumer cannot take the driver alone. -- [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) moves - `quic::web` onto moq-net's `transport::poll` traits and asks whether - `driver` and `web` should become private. +- The driver is public but `#[doc(hidden)]`, and is not on `release`. -Decide before the next breaking cut, because that cut publishes moq-quic and -the driver for the first time. Moving the driver after publication costs every -consumer a second break. +Decided 2026-10-20 (maintainer): `moq-quic` powers qmux and WebTransport, +and moq takes no new work in, or dependency on, moq-dev/web-transport, noq +or quinn. The driver is that stack's tokio runtime, beside moq-uring's +driver and the planned in-tree qmux, so this quest moves in-tree code only. +quinn stays the upstream the fork cherry-picks from, not a dependency. -Options: +Decided 2026-10-20: m2. The cut ships the driver hidden inside moq-tokio, so +options 1 and 2 add API later without breaking anyone. Option 3 makes +moq-tokio's moq-net API optional, which breaks `default-features = false` +users, so choosing it moves this quest to m1. -1. **A `moq-quic-tokio` crate (recommended).** The driver moves out of - moq-tokio unchanged, and moq-tokio depends on it and re-exports - `quic::driver`. Clean layering: sans-IO core, then the tokio runtime, then - the MoQ backends. Reverses the 2026-10-06 crate decision for the async - layer only; quinn-udp stays a moq-sock module. A trial extraction moved - the module as-is: once `Wire` became driver-owned counters, the driver's - tests passed unchanged. What the move has to settle: +**Provisional, until the maintainer decides: option 1, named `moq-quic-tokio`.** + +1. **A `moq-quic-tokio` crate.** The driver moves out of moq-tokio unchanged, + and moq-tokio depends on it and re-exports `quic::driver`. It keeps one + sans-IO core with a crate per runtime around it, as the planned in-tree + `qmux` crate does for its tokio session. Reverses the 2026-10-06 crate decision for the async layer + only; quinn-udp stays a moq-sock module. A trial extraction moved the + module as-is: once `Wire` became driver-owned counters, the driver's tests + passed unchanged. What the move has to settle: - The crate depends on moq-quic, `moq_sock::udp`, and moq-clock with its `runtime` feature, since the connection's timer is `moq_clock::Sleep`. - `runtime::send_failed` and `wrap_udp_socket` are `pub(crate)` helpers @@ -48,7 +54,8 @@ Options: public API or move. - Shorter paths let rustfmt re-wrap about 50 lines of `tests.rs`. Keep that churn out of the move commit, so quinn cherry-picks still apply. -2. **A `tokio` feature on moq-quic.** No new crate. But the gate would cover +2. **A `tokio` feature on moq-quic.** No new crate. But it puts a runtime + into the sans-IO core that moq-uring and qmux share, and the gate covers the driver's logic, not just a dependency, so its tests leave the default merge gate, against `rs/AGENTS.md`. 3. **Keep it in moq-tokio, with moq-net behind a default feature.** The @@ -58,18 +65,18 @@ Options: In every option: -- First, a separate PR replaces `Wire` with counters owned by the driver. +- The first commit replaces `Wire` with counters owned by the driver. moq-tokio converts at its boundary, and moq-net's wire stats do not change. - `quic::web` and `quic::backend` stay in moq-tokio, and [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) proceeds - as planned on top. The driver stays public. + as planned on top. The driver becomes documented public API. The driver + API changes that quest makes, such as aligning the stream setters with + moq-uring's, land wherever the driver lives; neither quest waits on the + other. - moq-uring's driver is out of scope. It is `!Send`, and coupled to moq-net through `server::Activity` as well as `Wire`. -- Land after the receive-lease PR (#5878), which rewrites the driver's receive - path. +- Land after the receive-lease PR + ([moq-dev/moq#5878](https://github.com/moq-dev/moq/pull/5878)), which + rewrites the driver's receive path. - Publish the driver crate, if option 1, with moq-quic, moq-sock and moq-clock in the same release. - -To settle with the maintainer: the option, the crate name, and whether the -decision belongs in m1, since it shapes what the cut publishes, while the move -itself stays m2. From 8faade37bc6bbb324c6c8c2098dd198466dccb70 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 20 Oct 2026 13:22:00 -0700 Subject: [PATCH 5/7] quest(m1): keep the QUIC driver in moq-tokio with moq-net optional The maintainer chose moq_tokio::quic: no new crate and no feature on moq-quic. moq-net moves behind a default feature that every transport enables, and a driver-only feature drops quic's other dependencies. That breaks default-features = false builds without a transport, so the quest moves to m1 with a MIGRATE entry in its plan. Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 + quest/m1/quic-driver.md | 89 ++++++++++++++++++++++++++++ quest/m2/README.md | 1 - quest/m2/drop-web-transport-trait.md | 2 +- quest/m2/quic-driver.md | 82 ------------------------- 5 files changed, 91 insertions(+), 84 deletions(-) create mode 100644 quest/m1/quic-driver.md delete mode 100644 quest/m2/quic-driver.md diff --git a/quest/m1/README.md b/quest/m1/README.md index 0520ca02390..a9d50241dd3 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -57,6 +57,7 @@ lands before the cut. - [Routing guide](/quest/m1/routing-guide.md) - concepts and practical outbound federation setup - [Controlled time](/quest/m1/time/README.md) - every crate and package reads time through moq-clock or @moq/clock, with regression tests for the changed contracts - [Own the QUIC stack](/quest/m1/quic/README.md) - quinn hard-forked in-tree as `moq-quic`, carrying BBR, reliable reset, hierarchical scheduling, peer limits, and endpoint sharding +- [An async QUIC driver without moq-net](/quest/m1/quic-driver.md) - `moq_tokio::quic::driver` is supported API that builds without moq-net, so other applications can embed moq-quic on tokio - [Finalize moq-lite-07](/quest/m1/lite07-finalize.md) - when the maintainer cuts it, lite-07 negotiates as `moq-lite-07` and the next release ships it - [moq-transport passthrough](/quest/m1/ietf-extension/README.md) - object IDs, properties, end status, datagram objects, and unknown track properties survive moq-transport -> moq-relay (and a relay cluster) -> moq-transport; moxygen's moq-test sections 1-7 pass nightly, except cases that use a subgroup other than 0 - [Refresh](/quest/m1/refresh/README.md) - a join asks for a fresh group once the current group's deltas exceed a publisher-advertised byte ratio, at every hop; replaces `Demand::used`/`unused` and moq-json's `delta_ratio` diff --git a/quest/m1/quic-driver.md b/quest/m1/quic-driver.md new file mode 100644 index 00000000000..e0cd85a3312 --- /dev/null +++ b/quest/m1/quic-driver.md @@ -0,0 +1,89 @@ +# [M] An async QUIC driver without moq-net + +## Goal + +An application runs `moq-quic` on tokio without depending on moq-net: +`moq_tokio::quic::driver`'s endpoint, connection, and stream futures, with +send groups, `reset_at`, receive leases, and live `Limits`, become documented +public API that builds without moq-net. Any Rust MoQ implementation, or any +QUIC application, can embed the stack moq-dev ships, instead of forking +quinn's async layer again. + +`cargo tree -e normal` on a driver-only build of moq-tokio +(`--no-default-features`, the driver feature, and a crypto provider) shows no +moq-net, kio, reqwest, or notify, and no crate from quinn, noq, or +moq-dev/web-transport. CI builds that feature set, and the driver's tests stay +in the merge gate. + +## Plan + +Where it stands: + +- The driver is quinn's async layer on moq-quic, kept as moq-tokio modules, + tokio-only (decided 2026-10-06 in the fork epic, over `moq-quic-udp` and + `moq-quic-tokio` crates). The udp half is now `moq_sock::udp`. +- Its only moq-net type is `moq_net::transport::Wire`, a pair of byte + counters (`quic/driver/connection.rs`). `quic/backend.rs` also takes + `moq_net::Versions` for ALPN lists, but sits above the driver. +- moq-net is a required dependency of moq-tokio, even without the `quic` + feature that gates the driver, so a consumer cannot take the driver alone. +- The driver is public but `#[doc(hidden)]`, and is not on `release`. + +Decided 2026-10-20 (maintainer): `moq-quic` powers qmux and WebTransport, +and moq takes no new work in, or dependency on, moq-dev/web-transport, noq +or quinn. The driver is that stack's tokio runtime, beside moq-uring's +driver and the planned in-tree qmux, so this quest moves no code out of the +tree. quinn stays the upstream the fork cherry-picks from, not a dependency. + +Decided 2026-10-20 (maintainer): the driver stays in moq-tokio, at +`moq_tokio::quic::driver`, and moq-net becomes optional there. No new crate +and no feature on moq-quic: the driver keeps its home and its tests, and the +sans-IO core that moq-uring and qmux share gets no runtime. It stays a +`driver` submodule, since `quic::Connection` and `quic::Error` already name +the MoQ backend's types. + +Rejected: a `moq-quic-tokio` crate (a new published crate and a reversal of +the 2026-10-06 decision) and a `tokio` feature on moq-quic (a runtime in the +sans-IO core, and the driver's tests behind a non-default gate). + +The work: + +- The first commit replaces `Wire` with counters owned by the driver. + moq-tokio converts at its boundary, and moq-net's wire stats do not change. +- moq-net moves behind a default feature, which every transport feature also + enables, since none works without it. `web-transport-trait` moves with it: + every user (`transport`, `server`, `tcp`, `quic::web`) is on the moq-net + side. Every moq-net use in moq-tokio, including the `moq_net` re-export, + gets the gate. +- A driver-only feature turns on `quic::driver` alone, and `quic` enables it + plus `quic::backend` and `quic::web`. `quic`'s other dependencies (reqwest, + notify through `watch`, kio, http, web-transport-proto, + rustls-native-certs, dns-lookup) stay on `quic`, so a driver-only build + drops them. Name both features in the implementing PR. +- Out of scope: moq-tokio's unconditional dependencies, which a driver-only + build still pulls through its `cli`, `tls`, and `settings` modules: tokio + `full`, rustls and rustls-platform-verifier, x509-parser, serde, toml, + tracing-subscriber, and usage-rs, plus rcgen and rustls-webpki from the + crypto-provider feature. None is MoQ code; splitting them is its own quest + if an embedder needs it. +- Drop the driver's `#[doc(hidden)]` and its "not a stable API" comment, and + document every exported item. The driver keeps quinn's rustfmt config. +- In-tree consumers with `default-features = false` and no transport feature + that use moq-net-backed modules (moq-room, moq-boy, moq-bench) enable the + new moq-net feature. +- `quic::web` and `quic::backend` stay as they are, and + [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) proceeds + on top. Driver API changes that quest makes, such as aligning the stream + setters with moq-uring's, land in the driver here; neither quest waits on + the other. +- moq-uring's driver is out of scope. It is `!Send`, and coupled to moq-net + through `server::Activity` as well as `Wire`. + +Decided 2026-10-20: m1, because making moq-net optional is a breaking change. +A build with `default-features = false` and no transport feature loses +`client`, `connect`, `connection`, `listen`, `origin`, `transport`, the root +re-exports built on them (`Client`, `Connection`, `Error`, ...), and the +`moq_net` re-export, so it lands before the cut. Add an entry under +`## Unreleased` in `rs/moq-tokio/MIGRATE.md`: enable the new moq-net feature +or a transport feature to keep them. Public API: the two new features, and +`quic::driver` becomes supported. Wire: none. diff --git a/quest/m2/README.md b/quest/m2/README.md index e7fb9f19870..45a9b44a520 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -108,7 +108,6 @@ ranked just below deterministic TS legs, which it requires. - [qmux on the QUIC stream state machine](/quest/m2/quic-qmux.md) - qmux is a first-class crate over `moq-quic`'s shared stream state machine - [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) - every backend implements moq-net's `transport::poll` traits, and the generic `web_transport_trait` adapters are deleted -- [An async QUIC driver without moq-net](/quest/m2/quic-driver.md) - `moq_tokio::quic::driver` becomes usable without moq-net, so other applications can embed moq-quic on tokio - [Measure ECN on the backbone](/quest/m2/quic-ecn-measure.md) - a written verdict on marking versus dropping, and whether Linode and OVH keep marks - [poll_acked on moq-net's send stream](/quest/m2/quic-ack-hook.md) - the diff --git a/quest/m2/drop-web-transport-trait.md b/quest/m2/drop-web-transport-trait.md index a55a25a4db5..979a8a1d8cc 100644 --- a/quest/m2/drop-web-transport-trait.md +++ b/quest/m2/drop-web-transport-trait.md @@ -47,7 +47,7 @@ each gets its own impl: `open_uni`/`open_bi` already accept. - moq-tokio's `quic::web` module is public but `#[doc(hidden)]`. Decide whether it is API or should be private. `quic::driver` stays public: - [An async QUIC driver without moq-net](/quest/m2/quic-driver.md) makes it + [An async QUIC driver without moq-net](/quest/m1/quic-driver.md) makes it supported API. Notes from related quests: diff --git a/quest/m2/quic-driver.md b/quest/m2/quic-driver.md deleted file mode 100644 index 1b523c3f8e9..00000000000 --- a/quest/m2/quic-driver.md +++ /dev/null @@ -1,82 +0,0 @@ -# [M] An async QUIC driver without moq-net - -## Goal - -An application runs `moq-quic` on tokio without depending on moq-net: the -endpoint, connection, and stream futures in `moq_tokio::quic::driver` today, -with send groups, `reset_at`, receive leases, and live `Limits`. Any Rust MoQ -implementation, or any QUIC application, can embed the stack moq-dev ships, -instead of forking quinn's async layer again. moq-tokio keeps its API by -re-exporting the driver. - -`cargo tree -e normal` on the driver shows no moq-net, kio-based model, or -moq-lite code, and no crate from quinn, noq, or moq-dev/web-transport. The -driver's tests move with it and stay in the merge gate. - -## Plan - -Where it stands: - -- The driver is quinn's async layer on moq-quic, kept as moq-tokio modules, - tokio-only (decided 2026-10-06 in the fork epic, over `moq-quic-udp` and - `moq-quic-tokio` crates). The udp half is now `moq_sock::udp`. -- Its only moq-net type is `moq_net::transport::Wire`, a pair of byte - counters (`quic/driver/connection.rs`). `quic/backend.rs` also takes - `moq_net::Versions` for ALPN lists, but sits above the driver. -- moq-net is a required dependency of moq-tokio, even without the `quic` - feature that gates the driver, so a consumer cannot take the driver alone. -- The driver is public but `#[doc(hidden)]`, and is not on `release`. - -Decided 2026-10-20 (maintainer): `moq-quic` powers qmux and WebTransport, -and moq takes no new work in, or dependency on, moq-dev/web-transport, noq -or quinn. The driver is that stack's tokio runtime, beside moq-uring's -driver and the planned in-tree qmux, so this quest moves in-tree code only. -quinn stays the upstream the fork cherry-picks from, not a dependency. - -Decided 2026-10-20: m2. The cut ships the driver hidden inside moq-tokio, so -options 1 and 2 add API later without breaking anyone. Option 3 makes -moq-tokio's moq-net API optional, which breaks `default-features = false` -users, so choosing it moves this quest to m1. - -**Provisional, until the maintainer decides: option 1, named `moq-quic-tokio`.** - -1. **A `moq-quic-tokio` crate.** The driver moves out of moq-tokio unchanged, - and moq-tokio depends on it and re-exports `quic::driver`. It keeps one - sans-IO core with a crate per runtime around it, as the planned in-tree - `qmux` crate does for its tokio session. Reverses the 2026-10-06 crate decision for the async layer - only; quinn-udp stays a moq-sock module. A trial extraction moved the - module as-is: once `Wire` became driver-owned counters, the driver's tests - passed unchanged. What the move has to settle: - - The crate depends on moq-quic, `moq_sock::udp`, and moq-clock with its - `runtime` feature, since the connection's timer is `moq_clock::Sleep`. - - `runtime::send_failed` and `wrap_udp_socket` are `pub(crate)` helpers - that `quic::backend` and `quic::web`'s tests call, so they become - public API or move. - - Shorter paths let rustfmt re-wrap about 50 lines of `tests.rs`. Keep - that churn out of the move commit, so quinn cherry-picks still apply. -2. **A `tokio` feature on moq-quic.** No new crate. But it puts a runtime - into the sans-IO core that moq-uring and qmux share, and the gate covers - the driver's logic, not just a dependency, so its tests leave the default - merge gate, against `rs/AGENTS.md`. -3. **Keep it in moq-tokio, with moq-net behind a default feature.** The - smallest move, but every moq-net use in moq-tokio needs a gate, and a - driver-only build keeps the `quic` feature's other dependencies, such as - reqwest and notify. - -In every option: - -- The first commit replaces `Wire` with counters owned by the driver. - moq-tokio converts at its boundary, and moq-net's wire stats do not change. -- `quic::web` and `quic::backend` stay in moq-tokio, and - [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) proceeds - as planned on top. The driver becomes documented public API. The driver - API changes that quest makes, such as aligning the stream setters with - moq-uring's, land wherever the driver lives; neither quest waits on the - other. -- moq-uring's driver is out of scope. It is `!Send`, and coupled to moq-net - through `server::Activity` as well as `Wire`. -- Land after the receive-lease PR - ([moq-dev/moq#5878](https://github.com/moq-dev/moq/pull/5878)), which - rewrites the driver's receive path. -- Publish the driver crate, if option 1, with moq-quic, moq-sock and moq-clock - in the same release. From 46d4b30d5a1a63c4753d67f993f3ee45cd4f7ff0 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 20 Oct 2026 13:22:32 -0700 Subject: [PATCH 6/7] quest(m1): rank the QUIC driver after the public model audit It is a moq-tokio API break, not QUIC stack work, and the new rank stays clear of the m1 lines #6083 edits. Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quest/m1/README.md b/quest/m1/README.md index acbd29008dc..6a8fadac463 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -57,7 +57,6 @@ lands before the cut. - [Routing guide](/quest/m1/routing-guide.md) - concepts and practical outbound federation setup - [Controlled time](/quest/m1/time/README.md) - every crate and package reads time through moq-clock or @moq/clock, with regression tests for the changed contracts - [Own the QUIC stack](/quest/m1/quic/README.md) - quinn hard-forked in-tree as `moq-quic`, carrying BBR, reliable reset, hierarchical scheduling, peer limits, and endpoint sharding -- [An async QUIC driver without moq-net](/quest/m1/quic-driver.md) - `moq_tokio::quic::driver` is supported API that builds without moq-net, so other applications can embed moq-quic on tokio - [Finalize moq-lite-07](/quest/m1/lite07-finalize.md) - when the maintainer cuts it, lite-07 negotiates as `moq-lite-07` and the next release ships it - [moq-transport passthrough](/quest/m1/ietf-extension/README.md) - object IDs, properties, end status, datagram objects, and unknown track properties survive moq-transport -> moq-relay (and a relay cluster) -> moq-transport; moxygen's moq-test sections 1-7 pass nightly, except cases that use a subgroup other than 0 - [Refresh](/quest/m1/refresh/README.md) - a join asks for a fresh group once the current group's deltas exceed a publisher-advertised byte ratio, at every hop; replaces `Demand::used`/`unused` and moq-json's `delta_ratio` @@ -68,6 +67,7 @@ lands before the cut. - [Subscribe ranges](/quest/m1/subscribe-ranges/README.md) - a lite-07 SUBSCRIBE asks for past and live ranges with absolute or relative ends, in either order, and replaces FETCH; merged ranges never starve a subscriber; relays fill misses by range, including over moq-transport - [More tests under load](/quest/m1/test-flakes-2/README.md) - the second round of load-only failures, one quest per flake, fixed at the cause - [A public model](/quest/m1/public-model/README.md) - every model item a built-in session reaches is public, unnecessary, or marked deliberately private, so a custom publisher, subscriber, or relay builds from the public model alone +- [An async QUIC driver without moq-net](/quest/m1/quic-driver.md) - `moq_tokio::quic::driver` is supported API that builds without moq-net, so other applications can embed moq-quic on tokio - [Lazy discovery](/quest/m1/lazy-discovery/README.md) - a `consume` session requests announcements only for prefixes the origin is watching, in JS then Rust; `follow`, `broadcasts`, and the `discovery` option go away - [Exact timestamps in every binding](/quest/m1/binding-timestamps.md) - bindings carry `{value, scale}` timestamps instead of lossy microseconds - [JSON window timestamps](/quest/m1/json-window-timestamps.md) - Rust and JS window consumers return each event's frame timestamp like the snapshot and stream consumers From ee2df07b80866158389eee388565fa3a3c3eb70d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 20 Oct 2026 15:18:23 -0700 Subject: [PATCH 7/7] quest(m1): leave quic::web API changes to the web-transport-trait quest Co-Authored-By: Claude Opus 5.5 --- quest/m1/quic-driver.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quest/m1/quic-driver.md b/quest/m1/quic-driver.md index e0cd85a3312..77a60ab3bf9 100644 --- a/quest/m1/quic-driver.md +++ b/quest/m1/quic-driver.md @@ -71,8 +71,9 @@ The work: - In-tree consumers with `default-features = false` and no transport feature that use moq-net-backed modules (moq-room, moq-boy, moq-bench) enable the new moq-net feature. -- `quic::web` and `quic::backend` stay as they are, and - [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) proceeds +- `quic::web` and `quic::backend` keep their features and dependencies here. + [Drop web-transport-trait](/quest/m2/drop-web-transport-trait.md) owns their + API changes, such as `quic::web::Session` dropping its `Deref`, and proceeds on top. Driver API changes that quest makes, such as aligning the stream setters with moq-uring's, land in the driver here; neither quest waits on the other.