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: 2 additions & 0 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ are folded into the [exporter's](/quest/m1/ffi-export/README.md). The
## Required

- [Waiting: publish the UniFFI fork](/quest/m1/uniffi-release.md) - the fork publishes to crates.io under `rust2-*` names, once the maintainer decides it should
- [Vec views of the right type](/quest/m1/ts-vec-view.md) - rust2-ts never translates a `Vec` of non-bytes as bytes, and the exporter's pin bump unblocks
- [Strings from UTF-8 bytes](/quest/m1/ts-utf8.md) - `str::from_utf8` translates, so the translator follows moq past its owned `Path`
- [Exporter](/quest/m1/ffi-export/README.md) - moq's bindings exported from its crates' `pub` API, replacing the fork
- [Land main through quest land](/quest/m1/land.md) - every queued PR lands as one tested batch through the shared gate
2 changes: 2 additions & 0 deletions quest/m1/ffi-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Every generator on the C ABI:
- [Closures lent for the call](/quest/m1/ffi-export/lent-closures.md) - a callback borrowed for one call, as `modify`'s `Guard` needs
- [One library from several crates](/quest/m1/ffi-export/crates.md) - the C names the several-crate export still can't give
- [Driving sessions and origins](/quest/m1/ffi-export/driving.md) - how a binding polls moq's `Driver`
- [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
- [A contract symbol](/quest/m1/ffi-export/contract.md) - a header and a library from different builds refuse to mix
- [C++ bindings](/quest/m1/ffi-export/cpp.md) - C++17, 20, and 23 over the C ABI, with native futures
- [Kotlin bindings](/quest/m1/ffi-export/kotlin.md) - JNI or Panama over the C ABI, with native futures
19 changes: 19 additions & 0 deletions quest/m1/ffi-export/session-quic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# [M] Sessions on sans-IO QUIC

## Goal

A binding runs moq sessions over moq-quic's sans-IO QUIC with no runtime in the library:
the library owns QUIC and TLS, and the binding moves UDP datagrams and drives the session's
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.

## 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.

Public API: the C names moq's bindings get.
19 changes: 19 additions & 0 deletions quest/m1/ffi-export/session-tokio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# [M] Sessions on moq-tokio

## Goal

A binding connects and accepts moq sessions with one call, as moq-ffi does today: the
exported library runs moq-tokio's sockets and runtime inside, and the binding never drives
a transport. Proven from C in `moq/moq.c` against a local relay or server.

## Plan

Decided with the maintainer on 2026-10-27, from
[#150](https://github.com/kixelated/rust2/pull/150): `Client::connect` and `Server::accept`
need a transport C can't supply. Bindings get both: this easy path first, since most
consumers want it, then [the sans-IO path](/quest/m1/ffi-export/session-quic.md).

- The runtime inside is moq-tokio's own, exported from its `pub` API like everything else.
Where its API needs a wrapper to cross the C ABI, that wrapper is new API in moq-tokio.

Public API: the C names moq's bindings get.
20 changes: 20 additions & 0 deletions quest/m1/ts-utf8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# [S] Strings from UTF-8 bytes

## Goal

[rust2-ts](/ts/README.md) translates `std::str::from_utf8` and `Utf8Error` (its
`valid_up_to`, `error_len`, `Display`, and `Debug`), with std's results on invalid input,
proven by differential tests against native Rust. `just ts moq` passes at the moq revision
past [moq-dev/moq#6843](https://github.com/moq-dev/moq/pull/6843), whose decoder calls it.

## Plan

Decided with the maintainer on 2026-10-27: the exporter and the translator share one moq
pin, so [the exporter's pin bump](https://github.com/kixelated/rust2/pull/144) merges once
this and [the `Vec` view fix](/quest/m1/ts-vec-view.md) pass at its revision.

- `TextDecoder` with `fatal` rejects what std rejects, but the error position must be std's
`valid_up_to` and `error_len`, so check its edge cases (truncated sequences, surrogates,
overlongs) against native.

Public API: the translator's output.
17 changes: 17 additions & 0 deletions quest/m1/ts-vec-view.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# [S] Vec views of the right type

## Goal

[rust2-ts](/ts/README.md)'s `vec_view` (`ts/src/lower/library.rs`) decides whether a `Vec`
is a byte vector from the `Vec`'s own type, so `Vec::as_slice` no longer panics and a
`Vec<Foo<u8>>` is never translated as bytes, proven by differential tests against native
Rust. `just ts census` passes at the moq revision
[the exporter's pin bump](https://github.com/kixelated/rust2/pull/144) moves to.

## Plan

Found by [#144](https://github.com/kixelated/rust2/pull/144) on 2026-10-27: the `as_slice`
case passes the element type where the `Vec` type is expected. A silent miscompile on any
pin, so reproduce it on `main` first, then find every caller that mixes the two.

Public API: the translator's output.