diff --git a/quest/m1/poll-first/README.md b/quest/m1/poll-first/README.md index 573406b16f0..ccf5e68d408 100644 --- a/quest/m1/poll-first/README.md +++ b/quest/m1/poll-first/README.md @@ -43,6 +43,17 @@ and their alternatives: coloring only because its evented backend parks whole stacks. kio's `&Waiter` parameter is the stackless half of that idea. Sans-IO is the other: the protocol never does I/O and each runtime drives it. +- **Sans-IO compared** in [moq-dev/moq#7058](https://github.com/moq-dev/moq/pull/7058), + on the lite subscriber's upstream SUBSCRIBE (an unmerged prototype, since deleted). + moq-net already takes I/O through its transport traits and runs on any executor, + so sans-IO only buys a core without waiters. That core translated through rust2-ts + with 4 refusals, but the serve loop driving it still had 919, so translating a + session still waits on the model. Rules became plain `#[test]`s, while + interleaving bugs stay in driver tests. Compile cost and the benches were flat. + The cost is an effect enum per model touch (+206 lines on this path). + **Decided (maintainer, 2026-10-28):** moq-net's protocol core stays kio poll and + does not move toward sans-IO. Pull pure wire rules into plain functions where + that turns scripted async tests into plain ones, as ordinary refactors. - **Gate the wrappers regardless** of the build measurement, because poll-first is the style moq wants. kixelated/rust2's [semantic API hash quest](https://github.com/kixelated/rust2/blob/main/quest/m3/api-cutoff.md) @@ -65,6 +76,5 @@ and their alternatives: - [kio::machine](/quest/m1/poll-first/machine.md) - kio's `macros` feature writes straight-line `poll_*` bodies, landing with the hand-written machines it replaces - [Straight-line bodies become machines](/quest/m1/poll-first/machine-bodies.md) - moq-net's straight-line `async fn` bodies become `#[kio::machine]` polls - [Generated async wrappers behind a feature](/quest/m1/poll-first/async-feature.md) - each library's `async fn` wrappers are generated from its `poll_*` signatures and compile only with its `async` feature -- [Sans-IO compared](/quest/m1/poll-first/sansio-compare.md) - one moq-net protocol path as a sans-IO core, compared with kio poll - [Libraries spawn nothing](/quest/m1/poll-first/no-spawn.md) - web-async goes, and moq-ffi, moq-stats, moq-wasm and moq-relay's cluster and auth run as polled `kio::Tasks` children instead of spawned tasks - [Incremental compilation for moq-net](/quest/m1/poll-first/incremental.md) - a one-line moq-net edit re-checks for less than a clean build diff --git a/quest/m1/poll-first/sansio-compare.md b/quest/m1/poll-first/sansio-compare.md deleted file mode 100644 index 00406ce75f3..00000000000 --- a/quest/m1/poll-first/sansio-compare.md +++ /dev/null @@ -1,30 +0,0 @@ -# [M] Sans-IO compared - -## Goal - -A report that converts one moq-net protocol path, such as a lite subscription's -control flow, to a sans-IO core (synchronous `handle_*` and `poll_transmit` / -`poll_timeout`-style calls with no `Waiter`, as quinn-proto and rustls do), driven -by a thin kio layer. It compares this with the kio `poll_*` version on: - -- implementation effort; -- testability (deterministic replay without moq-clock); -- rust2's TypeScript translation and FFI export of the result; -- compile time; -- runtime cost. - -It recommends whether moq-net's protocol core should move toward sans-IO. - -## Plan - -Decided with the maintainer on 2026-10-25: compare it in the design, and adopt it -only if it clearly wins. moq-uring already runs on a sans-IO QUIC stack, so -reuse its driving pattern. Zig's `std.Io` (I/O passed as an explicit parameter) -is the model the maintainer asked about. In Rust without stackful coroutines, -sans-IO is the closest equivalent that removes coloring from the protocol core. - -Public API: none; the prototype stays on a branch unless adopted. - -## Related - -- [moq-quic owns its waits](/quest/m1/quic-api/waits.md) - a sans-IO core that holds kio waiter lists but does no I/O, a middle point between the two styles compared here diff --git a/quest/m1/quic-api/waits.md b/quest/m1/quic-api/waits.md index 7253c4470b2..9557b7add4d 100644 --- a/quest/m1/quic-api/waits.md +++ b/quest/m1/quic-api/waits.md @@ -79,4 +79,3 @@ moq-quic's README fork list and describe migration in the PR's Impact section. W - [Poll forms](/quest/m1/quic-api/poll.md) - the drivers' public poll forms forward to these - [poll_acked](/quest/m2/quic-ack-hook.md) - its offset wait lives here - [QUIC lock contention](/quest/m2/perf/quic-lock-contention.md) - profiles the lock these waits are registered under -- [Sans-IO compared](/quest/m1/poll-first/sansio-compare.md) - a core that owns kio waits but no I/O is a third data point