Skip to content

feat(ffi): export moq-net's origin roots and request paths - #71

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/ffi-export
Oct 26, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/ffi-export

Conversation

@kixelated

@kixelated kixelated commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Slice of quest/m1/ffi-export.md.

Problem

moq-net's origin root(), absolute(), and Request::path() returned a Path<'_> borrowed from the handle, so the census refused all seven of them. moq-dev/moq#6808 has merged and returns the PathOwned they hold or build.

Approach

  • Bump the moq pin (ts/justfile's moq_rev) to current moq main, moq-dev/moq@88448d9.
  • Replace ffi/moq/ffi.toml's exclude list with the census's list at the new pin. The seven path entries are gone. moq's own API also drifted, which the stale-entry check enforces:
    • Gone from moq, so dropped: Epoch::time, Path::next_part, Version::names, broadcast::Finish::poll_closed, broadcast::Lister::poll_{used,unused}, cache::Pool::gc, stats::Registry::exclude, time::now, and stats::Refusal::ALL (now stats::RefusalKind::ALL).
    • New refusals: Client::with_url (url::Url), server::Handshake::with_deadline and cache::Pool::poll (moq_clock::Instant), and announce::Consumer::poll_synced (kio::Waiter).
  • moq/moq.c reads an origin producer's root and absolute, and a consumer's absolute. create_broadcast now returns a Publication, so the test takes its broadcast from that.
  • The quest's path bullet now covers what remains: moq-dev/moq#6843 (lifetime-free Path), still open. A census against its head shows the bump would export Path::new, strip_prefix, and Relative::new, and leave only Path::from_static refused. The quest's moq-native mentions are now moq-tokio, its new name.

root is always empty in the test: only scope sets one, and it takes Patterns, which the census still refuses.

Impact

  • No public API change in rust2. moq-net's export gains the seven path functions (moq_origin_producer_root, moq_origin_request_path, ...).

Checks

  • just check, just test: pass.
  • just ffi moq, just ffi census, just ts moq, just ts census at the new pin: pass.
  • just ffi bench: passes at the new pin (export 232 to 269 ns per frame against moq-c 226 to 242).

Alternatives

  • Wait for moq-dev/moq#6843 and bump once. It is still open, and this bump is independent.

Follow-ups

(written by Opus 5.5)

🤖 Generated with Claude Code

https://claude.ai/code/session_0115AT2ue6x9cT5e5J9SZtCn

kixelated and others added 2 commits October 25, 2026 21:25
Quest-Claim: ee13fd7b38456bde
Bump the moq pin to moq-dev/moq@88448d9, past moq-dev/moq#6808, so
origin root(), absolute(), and Request::path() return PathOwned and
export. moq.c drives root and absolute, and takes create_broadcast's
new Publication.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0115AT2ue6x9cT5e5J9SZtCn
@kixelated kixelated changed the title Exporter: moq's bindings from its crates' pub API feat(ffi): export moq-net's origin roots and request paths Oct 26, 2026
@kixelated
kixelated marked this pull request as ready for review October 26, 2026 04:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T04:55:53.802201Z 7949d26 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-26T04:57:56.092547Z 7949d26 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.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: 7949d26

No actionable bugs found. The pin/census update is a focused way to expose owned origin paths without adding handwritten wrappers or weakening the exporter's borrowed-return rules. The C fixture uses the existing clone-to-new-handle convention and adapts to Publication ownership; broader lifetime-free Path support remains an explicit follow-up.

Verification: static inspection of the four-file change, exporter lowering, and C/build recipes only. I did not independently run the census, C/TS builds, tests, or benchmarks; the reported checks and timings are author results.

@kixelated
kixelated merged commit e192638 into main Oct 26, 2026
1 check passed
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