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
14 changes: 8 additions & 6 deletions quest/m2/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ scope; they already sit on moq-ffi through the generated C++.
Decided 2026-10-25 (maintainer): this line ships after the cut, once moq builds
its bindings from rust2's UniFFI fork. The hand-written crate ships at the cut
with [parity](/quest/m1/c/README.md) instead. The generator fix for the C name
clash lands in rust2, not in a `kixelated/uniffi-bindgen-cpp` release.
clash landed in rust2's fork
([kixelated/rust2#66](https://github.com/kixelated/rust2/pull/66)), not in a
`kixelated/uniffi-bindgen-cpp` release, and reaches moq with the switch.

Decided earlier, still standing:

Expand All @@ -35,10 +37,11 @@ Decided earlier, still standing:
bullet carries the move for the package's `MIGRATE.md`.

The `moq-c` package (`c/moq`, `just c check`) builds the generated header and
its probe in CI, so drift fails loud. Until name-clash lands, it renames the
record `MoqAudioEncoderFinish` to `MoqAudioEncoderFinished` so the current
generator emits the header; the generator fix can revert that rename. No
`c-v*` tag ships before the cut.
its probe in CI, so drift fails loud. moq-ffi's record
`MoqAudioEncoderFinished` was renamed from `MoqAudioEncoderFinish` so moq's
current generator emits the header;
[the switch](/quest/m2/uniffi-fork.md) reverts that rename. No `c-v*` tag ships
before the cut.

The line owns the pre-publication check: every `doc/lib/c` sample and the C
interop client build and run against the built release archive.
Expand All @@ -48,6 +51,5 @@ publication; [old-crate retirement](/quest/m2/release/c-retire.md) follows.
## Required

- [Switch to rust2's UniFFI](/quest/m2/uniffi-fork.md) - the C generator comes from rust2's fork
- [One C name per moq-ffi item](/quest/m2/c/name-clash.md) - rust2's C generator names types in CamelCase and functions in snake_case, so the record `MoqAudioEncoderFinish` and the method `moq_audio_encoder_finish` never share a name
- [C consumers](/quest/m2/c/consumers.md) - the C interop client and `doc/lib/c` samples move onto the generated API
- [Async failure contract](/quest/m2/c/async-failure-contract.md) - every generated async call returns a task and calls back exactly once, cancelled when its task was freed first
64 changes: 0 additions & 64 deletions quest/m2/c/name-clash.md

This file was deleted.

26 changes: 23 additions & 3 deletions quest/m2/uniffi-fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ input. `rs/uniffi-bindgen`, `nix/uniffi-dart-*`, and the per-generator pins are
deleted, and the three `kixelated/uniffi-*` generator forks are archived.
The browser's TypeScript, generated through ubrn's `wasm2` flavour, still
generates against the fork. Generated bindings are unchanged by the switch
itself.
itself, except C's type names and the one record rename the C name rule
undoes.

## Plan

Expand Down Expand Up @@ -48,7 +49,23 @@ which publishes `rust2-uniffi`, `rust2-uniffi-core`, `rust2-uniffi-macros`, and
- **Generated code stays identical**: Kotlin package names, library symbol
prefixes, and every wrapper's API do not change. Diff the regenerated
bindings for every language against `main`'s, and run each wrapper's check
plus `just test interop --all`.
plus `just test interop --all`. The C names below are the only expected
differences.
- **C names** (maintainer, 2026-10-24 and 2026-10-25): rust2's C generator
names in GLib style
([kixelated/rust2#66](https://github.com/kixelated/rust2/pull/66)).
Types are CamelCase with the namespace prefix (`MoqError`, `MoqStringList`,
enum tags `<Enum>Tag`, async callbacks `<Function>Callback`), functions and
enum constants keep their names, and any remaining clash fails generation
with both items named. `c/moq` (its probe, `shutdown.c`, and docs) moves to
the new type names. moq-ffi's record `MoqAudioEncoderFinished` returns to
`MoqAudioEncoderFinish`, its name before
[moq-dev/moq#6052](https://github.com/moq-dev/moq/pull/6052) worked around
the old clash with `moq_audio_encoder_finish`; every wrapper's
`EncoderFinish` alias follows, so wrapper APIs do not change.
- rust2's C backend still refuses `Duration`, which moq-ffi's audio configs
use (moq's current generator accepts it), so the fork must accept it before
the switch can generate C.
- **One pin**: rust2 becomes a flake input, and `flake.nix`, the release
workflows, `rs/moq-ffi/build.sh`, and `sh/` read the generators from it.
Delete `rs/uniffi-bindgen`, the "five places" comments in `flake.nix`, and the
Expand All @@ -69,7 +86,10 @@ which publishes `rust2-uniffi`, `rust2-uniffi-core`, `rust2-uniffi-macros`, and
([Generated C bindings](/quest/m2/c/README.md)) to point at rust2, then
archive the three forks.

Public API: none; moq-ffi's dependency names change. Wire: none.
Public API: moq-ffi's dependency names change, generated C type names become
CamelCase, and the generated record `MoqAudioEncoderFinished` becomes
`MoqAudioEncoderFinish` in every language; wrapper APIs do not change. Wire:
none.

## Required

Expand Down
Loading