Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quest/m1/ffi-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Every generator on the C ABI:
- [Returned iterators cross as arrays](/quest/m1/ffi-export/iterators.md) - `Hops::iter`, `Versions::iter`, and `Patterns::iter` export, returning arrays as `&[T]` does
- [moq-clock's C names once it moves into kio](/quest/m1/ffi-export/crates.md) - `moq_now` and `moq_origin` become the clock's, after moq moves it into `kio::clock`
- [Sessions on moq-tokio](/quest/m1/ffi-export/session-tokio.md) - bindings connect and accept with one call, the library running moq-tokio inside
- [Sessions on sans-IO QUIC](/quest/m1/ffi-export/session-quic.md) - bindings move UDP datagrams and drive the session's poll themselves
- [Sessions on sans-IO QUIC](/quest/m1/ffi-export/session-quic.md) - bindings move UDP datagrams and drive the session's poll themselves, over moq's runtime-free QUIC driver once it lands
- [C++ bindings on MSVC and Clang](/quest/m1/ffi-export/cpp.md) - the C++ header built and tested beyond GCC on Linux
- [Kotlin bindings: zero-copy payloads and the read path](/quest/m1/ffi-export/kotlin.md) - the Kotlin lends bytes without a copy, and reads at JNI's cost
- [Kotlin bindings on Android](/quest/m1/ffi-export/kotlin-android.md) - an R8 keep rule for JNI's lookups, and an emulator run in CI
19 changes: 17 additions & 2 deletions quest/m1/ffi-export/session-quic.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,28 @@ the library owns QUIC and TLS, and the binding moves UDP datagrams and drives th
poll from its own event loop, as driving decided for the origin's
`Driver`. Proven from C in `moq/moq.c` against a local server.

This waits on moq's [runtime-free QUIC driver](https://github.com/moq-dev/moq/blob/main/quest/m2/quic-sansio-driver.md),
planned in [moq-dev/moq#7197](https://github.com/moq-dev/moq/pull/7197), which itself
waits on moq-quic owning its waits. It has landed once that quest is gone from moq's
`main` and the driver's connections implement moq-net's `transport::poll::Session`.

## Plan

Decided with the maintainer on 2026-10-27: the full-control path, after
[sessions on moq-tokio](/quest/m1/ffi-export/session-tokio.md). It suits consumers with
their own event loop or sockets.

- Exported from moq-quic's and moq-net's `pub` API; where moq-quic's session does not yet
fit moq-net's transport trait, that adapter is moq's change, not the exporter's.
Decided with the maintainer on 2026-10-28, from
[#215](https://github.com/kixelated/rust2/pull/215): at moq `30f25c04`, only moq-tokio's
and moq-uring's drivers join moq-quic to moq-net's `poll::Session`, and each brings a
runtime. The runtime-free driver that joins them is moq's change, not the exporter's.
Datagrams move by pull: the binding passes in each one it receives, polls on each wake and
at the deadline the poll returns, and drains the owned datagrams to send. No callback
crosses the ABI, and no buffer is lent mutably.

Then bump the moq pin and export the driver from its crate's `pub` API, with no wrapper.
At `30f25c04`, the census exports 60% of moq-quic's types and 86% of its methods, and
none of its traits. It refuses `Endpoint::handle`, `connection::Connection`, `Transmit`,
and `poll_transmit`'s `&mut Vec<u8>`. Report the driver crate's coverage before and after.

Public API: the C names moq's bindings get.