Skip to content

feat(moq-audio,moq-ffi,moq-video)!: drop the compile-trim features from the media and gateway crates - #8851

Merged
kixelated merged 5 commits into
mainfrom
quest/m2/features-leaf-trims
Nov 15, 2026
Merged

kixelated merged 5 commits into
mainfrom
quest/m2/features-leaf-trims

Conversation

@kixelated

@kixelated kixelated commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m2/features-leaf-trims.md (deleted here).

Summary

Each of these features gated pure-Rust code or logic only, so each is gone and its code always compiles (rs/AGENTS.md # Features: gate the dependency, not the logic).

  • moq-audio: aac and bus (their symphonia-* and ringbuf dependencies are now plain), and aec, whose wiring compiles on all(feature = "capture", feature = "playback"). default is now empty. capture and playback no longer list dep:ringbuf.
  • moq-ffi: audio and video (moq-audio, moq-video, pollster are plain dependencies). openh264 forwards as moq-video/openh264.
  • moq-rtmp: tls (rustls, tokio-rustls are plain). Server::with_tls, Connect::with_tls, and pub use rustls are always there; the "needs the tls feature" error for rtmps:// is gone.
  • moq-quic: mux (and the self dev-dependency that turned it on). qmux no longer asks for it.
  • moq-video: dmabuf compiles on target_os = "linux"; libc and linux-raw-sys are plain Linux dependencies. vaapi, render, and pipewire no longer list it.
  • moq-video, moq-transcode, and moq-cli: v4l2 joins the defaults beside vaapi and nvidia. It stays a feature, one vendor's hardware path, as the quest decided.
  • Tooling that named the removed features: rs/justfile (audio-devices runs --features capture,playback,pulseaudio; the CodSpeed recipe drops moq-audio/bus), the moq-audio bus bench's required-features, rs/moq-ffi/build.sh's --no-default-features flag and its target/minimal directory, the nightly size collector's libmoq_ffi-minimal build, and sh/gh/ffi.test.py's minimal case. Docs and READMEs that described the features are updated.

moq-webrtc's p2p was already removed by moq-dev/moq#8771, so nothing is left to do there.

Impact

Public API: no item changes shape; only Cargo features go away. A manifest that names a removed feature fails to resolve until the name is deleted.

Migration (for MIGRATE.md at the release cut):

  • moq-audio: delete aac, bus, and default-features = false workarounds for them. Replace aec with capture,playback to keep both device APIs; the aec module is always compiled for caller-supplied PCM.
  • moq-ffi: delete audio and video; every build carries both codecs. A --no-default-features build to drop them no longer exists.
  • moq-rtmp: delete tls and default-features = false; RTMPS is always compiled in.
  • moq-quic: delete mux.
  • moq-video: delete dmabuf. v4l2 is now a default feature, so a consumer that builds with default-features = false still names it as before.

Wire: none.

Dependency cost: a moq-audio, moq-rtmp, moq-ffi, or moq-video consumer that had trimmed one of these now compiles symphonia-codec-aac, symphonia-core, ringbuf, rustls/tokio-rustls, or libc/linux-raw-sys. All were already in the workspace graph (moq-cli, moq-relay, and the bindings build every one).

Decisions

Choices a review can undo:

  • Dropped the nightly libmoq_ffi-minimal size series instead of keeping a --no-default-features build of moq-ffi. With no features left it would measure the same library the releases do, minus OpenH264, and its first night would trip the 5% and 30-day growth checks. rs/moq-ffi/build.sh lost its --no-default-features flag for the same reason.
  • Left the C++ prebuilt manifest.json features: default field and MOQ_FFI_DIR check alone: the field now only rejects an old minimal prebuilt, and changing the manifest format is out of this quest's scope.
  • Left .github/workflows/moq-cli.yml's linux-features: v4l2 (redundant now) for Ship capture and playback, as the quest said.
  • Left .github/compile-time-audit.json, a generated audit snapshot that still lists dmabuf; it regenerates with the next audit.
  • Kept default-features = false on the root moq-audio dependency, though its default list is now empty, so a later default needs no manifest sweep.
  • A follow-up quest, not an inline step, restarts the nightly size history (see below).

Validation

  • cargo check --workspace --all-targets (excluding moq-ffi, which is its own build), and clippy -D warnings over moq-audio (capture,playback), moq-video (capture,render), moq-rtmp, moq-quic, qmux, and moq-ffi.
  • just rs test for moq-audio, moq-rtmp, moq-quic, moq-video, moq-transcode, and qmux; moq-audio again with capture,playback (412 tests, which now include the echo-canceller wiring in the compile); moq-ffi with openh264 (324 tests); just rs net-features; just rs media-features (dependency contracts ok).
  • cargo tree -p moq-cli --features transcode -e features -i moq-video shows v4l2 reaching moq-video from moq-cli's defaults.
  • just fix regenerated nix/Cargo.nix, Cargo.lock, and demo/carla/bridge/Cargo.lock (its moq-video now has libc and linux-raw-sys unconditionally); just check and just gh test pass after updating the FFI packager test.
  • Merged origin/main (drops moq-quic's mux self-dev-dependency, keeps main's moq-congestion lab dev-dependency); after it just check, just rs test for moq-audio, moq-video, moq-ffi, moq-rtmp, moq-quic, moq-cli, and moq-c (2302 passed), and just test interop --all pass.
  • Not run: the macOS and Windows builds (nightly just rs macos) and a real-device audio-devices run.

Follow-ups

  • Restart the nightly size history: dropping the libmoq_ffi-minimal series makes sh/size/report.py refuse every report ("artifacts missing or renamed") until the retained nightly-size-history artifacts are deleted after this merges. No open decisions.

Models

Size: S
Implementer: Claude Code, claude-sonnet-5-5, unknown effort (arm B)
Implementer: Claude Code, claude-sonnet-5-5, high effort (iterate, S, arm B)

(Written by Sonnet 5.5)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: 6bd2b39

  • Base: origin/main at 490e673

  • Risk: high, Removing public Cargo features can break downstream dependency manifests until consumers update them; reverting restores compatibility.

  • Classified: medium by default

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1dfd9-e95c-7053-a696-c041cc3f959b, round 2

  • Score: 8/10, The incremental changes introduce no actionable regressions, though builds and tests were not run as instructed.

  • Raised the risk to high: Removing public Cargo features can break downstream dependency manifests until consumers update them; reverting restores compatibility.

  • Rounds: 2; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 3 commits November 15, 2026 06:52
…om the media and gateway crates

moq-audio's aac, bus, and aec, moq-ffi's audio and video, moq-rtmp's tls, and
moq-quic's mux always compile, and moq-video's dmabuf compiles on Linux. v4l2
joins the defaults of moq-video, moq-transcode, and moq-cli beside vaapi and
nvidia. moq-webrtc's p2p already went with #8771.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Drop the compile-trim features from the media and gateway crates feat(moq-audio,moq-ffi,moq-video)!: drop the compile-trim features from the media and gateway crates Nov 15, 2026
@kixelated
kixelated marked this pull request as ready for review November 15, 2026 15:37
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2ea34c6-a43e-449a-a393-533115b58da4
Commits

Reviewing files that changed from the base of the PR and between 952c55d and 6bd2b39.

Files ignored due to path filters: 2

  • Cargo.lock is excluded by !**/*.lock
  • demo/carla/bridge/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 59

  • .cargo/config.toml
  • .github/justfile
  • bench/README.md
  • dart/README.md
  • dart/moq_ffi/README.md
  • doc/lib/rs/moq-audio.md
  • doc/lib/rs/moq-video.md
  • nix/Cargo.nix
  • quest/m2/features-leaf-trims.md
  • quest/m2/size-history-reset.md
  • quest/m3/release/feature-flags.md
  • rs/justfile
  • rs/moq-audio/Cargo.toml
  • rs/moq-audio/src/aec.rs
  • rs/moq-audio/src/aec/processor.rs
  • rs/moq-audio/src/bus.rs
  • rs/moq-audio/src/capture.rs
  • rs/moq-audio/src/capture/buffer.rs
  • rs/moq-audio/src/decode/backend/mod.rs
  • rs/moq-audio/src/decode/conformance.rs
  • rs/moq-audio/src/decode/decoder.rs
  • rs/moq-audio/src/encode/capture.rs
  • rs/moq-audio/src/level.rs
  • rs/moq-audio/src/lib.rs
  • rs/moq-audio/src/playback.rs
  • rs/moq-audio/src/playback/driver.rs
  • rs/moq-audio/src/playback/mixer.rs
  • rs/moq-c/Cargo.toml
  • rs/moq-cli/Cargo.toml
  • rs/moq-ffi/Cargo.toml
  • rs/moq-ffi/build.sh
  • rs/moq-ffi/src/bandwidth.rs
  • rs/moq-ffi/src/error.rs
  • rs/moq-ffi/src/ffi.rs
  • rs/moq-ffi/src/lib.rs
  • rs/moq-ffi/src/media.rs
  • rs/moq-ffi/src/test.rs
  • rs/moq-quic/Cargo.toml
  • rs/moq-quic/src/connection/mod.rs
  • rs/moq-quic/src/connection/streams/recv.rs
  • rs/moq-quic/src/connection/streams/state.rs
  • rs/moq-quic/src/frame.rs
  • rs/moq-rtmp/Cargo.toml
  • rs/moq-rtmp/README.md
  • rs/moq-rtmp/src/dial.rs
  • rs/moq-rtmp/src/lib.rs
  • rs/moq-rtmp/src/server.rs
  • rs/moq-transcode/Cargo.toml
  • rs/moq-video/Cargo.toml
  • rs/moq-video/README.md
  • rs/moq-video/src/frame.rs
  • rs/moq-video/src/lib.rs
  • rs/moq-video/src/render/mod.rs
  • rs/moq-video/src/render/renderer.rs
  • rs/moq-video/src/render/source.rs
  • rs/qmux/Cargo.toml
  • sh/gh/ffi.test.py
  • sh/size/README.md
  • sh/size/collect.sh
  • 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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — two stale comments inline.

Reviewed changes

The whole diff: Cargo features removed from five crates, plus the tooling and docs that named them.

  • moq-audio: aac, bus, and aec are gone and default is now empty. The echo-canceller wiring compiles on all(feature = "capture", feature = "playback"). ring, comfort, stretch, bus, and the AAC decoder always compile.
  • moq-ffi: audio and video are gone, and the codecs are plain dependencies. openh264 now forwards straight to moq-video/openh264. build.sh --no-default-features and its target/minimal directory are removed.
  • moq-rtmp: tls is gone. Conn::Tls, Server::with_tls, Connect::with_tls, and pub use rustls always compile.
  • moq-quic / qmux: mux and the self dev-dependency that turned it on are gone.
  • moq-video: dmabuf is gone and the DMA-BUF code is gated on target_os = "linux" alone. libc and linux-raw-sys were already in the Linux target table, so they are now plain dependencies with no effect on macOS or Windows. v4l2 is now a default in moq-video, moq-transcode, and moq-cli.
  • Nightly size: the libmoq_ffi-minimal series is dropped. The PR description and the new size-history-reset quest both say the Nightly size check stays red until the old history artifacts are deleted.

I checked these locally:

  • cargo check -p moq-video --no-default-features --lib and --features nvidia both build with no warnings. The DMA-BUF code now compiles without vaapi, render, or pipewire, and it raises no dead_code warnings.
  • cargo check -p moq-audio --no-default-features --all-targets builds with no warnings.
  • A grep of the Cargo manifests, sh/, the workflows, the CMake files, and the Dart build hook found no remaining uses of the removed feature names.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using claude-opus-5-5 | 𝕏

Comment thread rs/moq-ffi/src/error.rs Resolved
Comment thread rs/moq-rtmp/src/server.rs Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found. Both stale comments from the last review are fixed.

Reviewed changes

This run covered what changed after 0693101: a merge of origin/main and a pass over comments that went stale.

  • Merged origin/main: moq-quic's dev-dependencies keep main's moq-congestion lab and do not bring back the mux self dev-dependency. nix/Cargo.nix agrees with them.
  • Removed stale feature-gate comments: the MoqError codec-errors comment in rs/moq-ffi/src/error.rs and the rtmps_and_rtmp_share_one_port doc in rs/moq-rtmp/src/server.rs no longer mention the removed audio/video/tls features.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit d353241 Nov 15, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m2/features-leaf-trims branch November 15, 2026 23:07
kixelated added a commit that referenced this pull request Nov 15, 2026
Takes #8851's leaf trims: moq-cli's default gains v4l2 without the removed network
features, qmux takes moq-quic without its removed mux feature, and the finished
leaf-trims quest stays deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated added a commit to moq-dev/studio that referenced this pull request Nov 16, 2026
Moves the pin to moq-dev/moq@6c726f455, which holds ashpd at 0.13
(moq-dev/moq#8861). moq-dev/moq#8851 and #8852 dropped the compile-trim
features, so moq-audio's bus and moq-tokio's network stack always compile:
the studio drops its bus, net, quic, and websocket features.

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