Skip to content

feat(cpp)!: generate unprefixed names and one moq::expected - #5727

Merged
kixelated merged 10 commits into
mainfrom
quest/m1/cpp-generated-shape
Oct 17, 2026
Merged

kixelated merged 10 commits into
mainfrom
quest/m1/cpp-generated-shape

Conversation

@kixelated

@kixelated kixelated commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Completes quest/m1/cpp-generated-shape: before the first cpp-v* release, each C++ type has one name and moq::expected is one type.

Generator changes: kixelated/uniffi-bindgen-cpp#4, released as v0.11.0-kixelated.5+v0.32.2.

Changes

  • cpp/moq/uniffi.toml sets the fork's new strip_type_prefix = "Moq", so moq::Client is the generated type itself. moq.hpp drops the ~100-line alias list, and just cpp check drops the audit of it.
  • The fork now always uses the bundled tl::expected, so moq.hpp and src/moq.cpp drop the MOQ_ABI link guard, and the "C++ standard" sections leave doc/lib/cpp/index.md and cpp/moq/README.md. With exceptions off, value() on an error now aborts with a message, so the docs' "undefined" warning now covers only *result.
  • sh/cpp/check.sh replaces test-target-23 with test-mixed: the bindings at C++17 under a probe target at C++23. It fails to link without this change, so it is the regression test for the goal.
  • The generator pin moves to v0.11.0-kixelated.5+v0.32.2 in flake.nix (version, source hash, and cargoHash, which moved with the fork's Cargo.lock version bump), four workflows (including feat(cpp): reuse validated shared FFI native inputs #5740's release-shared-ffi.yml), rs/moq-ffi/build.sh, and cpp/moq/README.md. The flake.nix comment lists them and drops obs.yml, which never named the tag.
  • Quests: deletes this quest and its references, and updates the C++ note in quest/m1/ffi-shape.

Public API

C++ only, and unreleased (no cpp-v* tag yet), so there is no upgrade note.

  • moq::MoqFoo names are gone; moq::Foo is the generated type. The short names users already wrote still compile.
  • moq::expected is tl::expected at C++23 too, no longer std::expected. It has the same members.
  • MOQ_ABI, MOQ_ABI_NAME, and MOQ_IMPLEMENTATION are gone.

Wire: none.

Checks

Decisions

  • Mixed-standard probe: ✅ keep it as test-mixed, proving C++23 code links against C++17 bindings / delete test-target-23 as the quest said.
  • tl::expected in the fork: ✅ unconditional, since an option would keep the mismatch as a footgun / behind an option.
  • Free functions (moq_log_level, moq_mint_epoch): ✅ keep their prefix here, so moq.hpp still wraps them / strip them in this PR.
  • Generator release: ✅ merge and tag the fork, then pin the tag / ship on the commit pin.

Follow-ups

  • Strip the moq_ prefix from generated free functions too (for example strip_function_prefix), which would let moq.hpp drop its log_level/mint_epoch wrappers. Recommend a small quest after the fork moves to moq-dev/uniffi.
  • Doc comments in the generated header still name the Rust types (MoqClientConfig). This is cosmetic and shared with every binding. Recommend leaving it.
  • feat(ffi,obs): client settings parity for OBS #5726 adds using CongestionControl = MoqCongestionControl; to the alias list this PR deletes. Whichever lands second drops that line; the prefix strip generates moq::CongestionControl.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 2 commits October 16, 2026 08:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uniffi.toml sets the generator fork's new `strip_type_prefix = "Moq"`, so
moq-ffi's `MoqClient` is generated as `moq::Client` and moq.hpp drops its
alias list and the `just cpp check` audit of it. The fork also makes
`uniffi::expected` the bundled `tl::expected` at every C++ standard, so
the MOQ_ABI link guard and the "C++ standard" docs go away, and `value()`
on an error aborts with a message instead of being undefined. The check
now builds the probe at C++23 over bindings at C++17 to prove they link.

The generator pin is the head of kixelated/uniffi-bindgen-cpp#4 until
that PR is released as v0.11.0-kixelated.5+v0.32.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Quest outcome: implemented end to end. The PR stays a draft until the fork is released and the pin moves to the tag (see "Before merge" above).

Checks run locally:

  • just check origin/main, with CMake pointed at the pinned generator: everything passed, including the cpp module. The only failure was the Markdown lint tripping on my untracked scratch clone of the fork. After I deleted it, sh/markdown.sh check passes.
  • sh/cpp/check.sh and nix build .#uniffi-bindgen-cpp, as described above.

Not run: the CI matrix (macOS, Windows, OBS), which runs on this PR.

(Written by Claude Opus 5.5)

…4940c4958a2

# Conflicts:
#	cpp/moq/include/moq/moq.hpp
#	quest/m1/cpp-package-check.md
#	quest/m1/ffi-shape/layers-guide.md
@kixelated
kixelated marked this pull request as ready for review October 17, 2026 02:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T02:29:03.759080Z 325d66d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 60e607a6-51d8-41af-ae37-569196cf72e5
📥 Commits

Reviewing files that changed from the base of the PR and between 364c262 and efb1a11.

📒 Files selected for processing: 22
  • .github/workflows/cpp.yml
  • .github/workflows/platform.yml
  • .github/workflows/release-cpp.yml
  • .github/workflows/release-shared-ffi.yml
  • cpp/moq/CMakeLists.txt
  • cpp/moq/README.md
  • cpp/moq/cmake/moq-cpp-config.cmake.in
  • cpp/moq/cmake/moq-cpp.pc.in
  • cpp/moq/include/moq/moq.hpp
  • cpp/moq/src/moq.cpp
  • cpp/moq/test/CMakeLists.txt
  • cpp/moq/uniffi.toml
  • doc/lib/cpp/index.md
  • flake.nix
  • quest/m1/README.md
  • quest/m1/cpp-generated-shape.md
  • quest/m1/cpp-package-check.md
  • quest/m1/ffi-shape/README.md
  • quest/m2/release/cpp-release.md
  • quest/m2/uniffi-fork.md
  • rs/moq-ffi/build.sh
  • sh/cpp/check.sh

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10df7d97-2dbf-4c02-ad90-024d682bdbde
📥 Commits

Reviewing files that changed from the base of the PR and between 325d66d and 364c262.

📒 Files selected for processing: 11
  • .github/workflows/release-cpp.yml
  • .github/workflows/release-shared-ffi.yml
  • cpp/moq/CMakeLists.txt
  • cpp/moq/include/moq/moq.hpp
  • doc/lib/cpp/index.md
  • flake.nix
  • quest/m1/README.md
  • quest/m1/cpp-package-check.md
  • quest/m2/release/cpp-release.md
  • quest/m2/uniffi-fork.md
  • sh/cpp/check.sh
💤 Files with no reviewable changes: 3
  • quest/m1/cpp-package-check.md
  • quest/m1/README.md
  • quest/m2/release/cpp-release.md
🚧 Files skipped from review as they are similar to previous changes: 2
  • cpp/moq/CMakeLists.txt
  • quest/m2/uniffi-fork.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Walkthrough

The C++ UniFFI generator pin advances to v0.11.0-kixelated.5+v0.32.2, and its configuration strips the Moq prefix from generated types. The wrapper removes its short-name aliases and standard-dependent ABI guard. The C++ check now builds C++17 bindings with a C++23 probe. Documentation and quest references are updated.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 364c2

This change moves the C++ bindings to unprefixed generated names and a single bundled expected type. No actionable merge-blocking risk was found in the supplied changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main C++ API changes: unprefixed generated names and a single moq::expected type.
Description check Passed The description directly explains the generator update, API changes, tests, dependency pin, and related quest completion.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
✨ Simplify code
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…4940c4958a2

# Conflicts:
#	cpp/moq/include/moq/moq.hpp
#	doc/lib/cpp/index.md
#	flake.nix
#	quest/m1/ffi-shape/layers-guide.md
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merging with the maintainer's approval.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge October 17, 2026 14:38
@kixelated
kixelated added this pull request to the merge queue Oct 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 17, 2026
…9564940c4958a2

# Conflicts:
#	quest/m1/README.md
#	quest/m2/release/cpp-release.md
@kixelated
kixelated enabled auto-merge October 17, 2026 16:08
…9564940c4958a2

# Conflicts:
#	sh/cpp/check.sh
…9564940c4958a2

# Conflicts:
#	cpp/moq/include/moq/moq.hpp
#	quest/m1/README.md
#	quest/m1/cpp-package-check.md
#	quest/m2/release/cpp-release.md
@kixelated
kixelated disabled auto-merge October 17, 2026 17:13
@kixelated
kixelated enabled auto-merge October 17, 2026 17:13
@kixelated
kixelated added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit 02ad15c Oct 17, 2026
34 of 35 checks passed
@kixelated
kixelated deleted the quest/m1/cpp-generated-shape branch October 17, 2026 18:21
kixelated added a commit that referenced this pull request Oct 17, 2026
…ames

Also covers @moq/hang's reserved catalog `version` from #5806.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated added a commit that referenced this pull request Oct 17, 2026
Conflicts:
- cpp/moq/include/moq/moq.hpp: take main's #5727, which generates
  unprefixed names, dropping the alias list (and this branch's
  Anchor/Order/Range aliases, now generated directly).
- rs/moq-net/src/model/track.rs: keep both appended test sets
  (subscription ranges here, rewind refusal from #5803).

Semantic follow-ups for callers main added against the old API:
- rs/moq-net/tests/integration/received_rewind.rs: with_start(group 0)
  becomes with_groups(0..), as this branch migrated other callers.
- py/moq-rs/tests/test_testing_clock.py: group_start=0 becomes an
  absolute group-0 range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant