Repository navigation
feat(moq-audio,moq-ffi,moq-video)!: drop the compile-trim features from the media and gateway crates - #8851
Conversation
Quest-Claim: 921ab0aef2dc8137
…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>
|
Warning Review limit reachedYou'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. View limit details
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. |
There was a problem hiding this comment.
ℹ️ 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, andaecare gone anddefaultis now empty. The echo-canceller wiring compiles onall(feature = "capture", feature = "playback").ring,comfort,stretch,bus, and the AAC decoder always compile. - moq-ffi:
audioandvideoare gone, and the codecs are plain dependencies.openh264now forwards straight tomoq-video/openh264.build.sh --no-default-featuresand itstarget/minimaldirectory are removed. - moq-rtmp:
tlsis gone.Conn::Tls,Server::with_tls,Connect::with_tls, andpub use rustlsalways compile. - moq-quic / qmux:
muxand the self dev-dependency that turned it on are gone. - moq-video:
dmabufis gone and the DMA-BUF code is gated ontarget_os = "linux"alone.libcandlinux-raw-syswere already in the Linux target table, so they are now plain dependencies with no effect on macOS or Windows.v4l2is now a default in moq-video, moq-transcode, and moq-cli. - Nightly size: the
libmoq_ffi-minimalseries is dropped. The PR description and the newsize-history-resetquest 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 --liband--features nvidiaboth build with no warnings. The DMA-BUF code now compiles without vaapi, render, or pipewire, and it raises nodead_codewarnings.cargo check -p moq-audio --no-default-features --all-targetsbuilds 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.
claude-opus-5-5 | 𝕏
There was a problem hiding this comment.
✅ 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'smoq-congestionlaband do not bring back themuxself dev-dependency.nix/Cargo.nixagrees with them. - Removed stale feature-gate comments: the
MoqErrorcodec-errors comment inrs/moq-ffi/src/error.rsand thertmps_and_rtmp_share_one_portdoc inrs/moq-rtmp/src/server.rsno longer mention the removedaudio/video/tlsfeatures.
claude-opus-5-5 | 𝕏
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>
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>

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).aacandbus(theirsymphonia-*andringbufdependencies are now plain), andaec, whose wiring compiles onall(feature = "capture", feature = "playback").defaultis now empty.captureandplaybackno longer listdep:ringbuf.audioandvideo(moq-audio,moq-video,pollsterare plain dependencies).openh264forwards asmoq-video/openh264.tls(rustls,tokio-rustlsare plain).Server::with_tls,Connect::with_tls, andpub use rustlsare always there; the "needs thetlsfeature" error forrtmps://is gone.mux(and the self dev-dependency that turned it on).qmuxno longer asks for it.dmabufcompiles ontarget_os = "linux";libcandlinux-raw-sysare plain Linux dependencies.vaapi,render, andpipewireno longer list it.v4l2joins the defaults besidevaapiandnvidia. It stays a feature, one vendor's hardware path, as the quest decided.rs/justfile(audio-devicesruns--features capture,playback,pulseaudio; the CodSpeed recipe dropsmoq-audio/bus), the moq-audiobusbench'srequired-features,rs/moq-ffi/build.sh's--no-default-featuresflag and itstarget/minimaldirectory, the nightly size collector'slibmoq_ffi-minimalbuild, andsh/gh/ffi.test.py's minimal case. Docs and READMEs that described the features are updated.moq-webrtc's
p2pwas 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.mdat the release cut):aac,bus, anddefault-features = falseworkarounds for them. Replaceaecwithcapture,playbackto keep both device APIs; theaecmodule is always compiled for caller-supplied PCM.audioandvideo; every build carries both codecs. A--no-default-featuresbuild to drop them no longer exists.tlsanddefault-features = false; RTMPS is always compiled in.mux.dmabuf.v4l2is now a default feature, so a consumer that builds withdefault-features = falsestill 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, orlibc/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:
libmoq_ffi-minimalsize series instead of keeping a--no-default-featuresbuild 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.shlost its--no-default-featuresflag for the same reason.manifest.jsonfeatures: defaultfield andMOQ_FFI_DIRcheck alone: the field now only rejects an oldminimalprebuilt, and changing the manifest format is out of this quest's scope..github/workflows/moq-cli.yml'slinux-features: v4l2(redundant now) for Ship capture and playback, as the quest said..github/compile-time-audit.json, a generated audit snapshot that still listsdmabuf; it regenerates with the next audit.default-features = falseon the rootmoq-audiodependency, though its default list is now empty, so a later default needs no manifest sweep.Validation
cargo check --workspace --all-targets(excluding moq-ffi, which is its own build), and clippy-D warningsover moq-audio (capture,playback), moq-video (capture,render), moq-rtmp, moq-quic, qmux, and moq-ffi.just rs testfor moq-audio, moq-rtmp, moq-quic, moq-video, moq-transcode, and qmux; moq-audio again withcapture,playback(412 tests, which now include the echo-canceller wiring in the compile); moq-ffi withopenh264(324 tests);just rs net-features;just rs media-features(dependency contracts ok).cargo tree -p moq-cli --features transcode -e features -i moq-videoshowsv4l2reaching moq-video from moq-cli's defaults.just fixregeneratednix/Cargo.nix,Cargo.lock, anddemo/carla/bridge/Cargo.lock(its moq-video now haslibcandlinux-raw-sysunconditionally);just checkandjust gh testpass after updating the FFI packager test.origin/main(dropsmoq-quic'smuxself-dev-dependency, keeps main'smoq-congestionlabdev-dependency); after itjust check,just rs testfor moq-audio, moq-video, moq-ffi, moq-rtmp, moq-quic, moq-cli, and moq-c (2302 passed), andjust test interop --allpass.just rs macos) and a real-deviceaudio-devicesrun.Follow-ups
libmoq_ffi-minimalseries makessh/size/report.pyrefuse every report ("artifacts missing or renamed") until the retainednightly-size-historyartifacts 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 reviewafter 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 2Score: 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