Bundle libopus instead of linking the system copy - #211
Conversation
opus 0.4 replaces the unmaintained audiopus_sys with opusic-sys, which builds libopus 1.6.1 with CMake and links it statically on every platform. The opus API is unchanged, so the encoder itself does not move. That makes cmake a build dependency everywhere and libopus a runtime dependency nowhere: Linux CI trades libopus-dev for cmake, the AUR package drops opus from depends, and the AppImage no longer leans on the host copy. The bundled opus asks for CMake 3.16, so the policy override that kept CMake 4 happy with audiopus_sys' ancient CMakeLists can go, and with it the RUSTSEC-2026-0150 ignore in deny.toml.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
💤 Files with no reviewable changes (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe project upgrades to ChangesBundled libopus migration
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Other Merge Risk: ⚪ Minimal · up to The bundled libopus migration is consistent across build and packaging paths, with no merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Closes #201.
opus0.4 replaces the unmaintainedaudiopus_sys(RUSTSEC-2026-0150) withopusic-sys0.7 (BSD-3, libopus 1.6.1, MSRV 1.82). TheopusAPI is byte-identical between 0.3.1 and 0.4.0 apart from theextern crateline, so the encoder code does not move.opuspullsopusic-syswith default features on, sobundledcannot be turned off through feature unification: every platform now builds libopus from source with CMake and links it statically. That is a trade we want — cmake at build time, libopus nowhere at runtime.Changes
opus = "0.4"in the workspace manifest, plus the refreshed libopus note.libopus-devforcmake(one edit in the shared composite covers CI and the ubuntu:22.04 release container, whose cmake 3.22 clears the bundled opus' 3.16 floor). Windows and macOS runners already ship cmake; their comments now name the right crate.cmakeinmakedepends,opusout ofdepends(the static link removes the runtime dependency),.SRCINFOregenerated.CMAKE_POLICY_VERSION_MINIMUMoverride in.cargo/config.toml— it existed only becauseaudiopus_sys' vendored CMakeLists declared a pre-3.5 minimum that CMake 4 refuses. The bundled libopus 1.6.1 asks for 3.16, so the file is gone entirely.deny.toml.opusic-sys' BSD-3 was already on the license allowlist.Verified locally
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings,cargo build --workspace --all-targets,cargo test --workspace(all green, including the 6 Opus encoder tests),cargo deny check→advisories ok, bans ok, licenses ok, sources ok.ldd target/debug/rewynd-recorderlists nolibopus.so, andopus_encoder_createis in the binary: the static link is real, so the AppImage stops leaning on the host copy.Summary by CodeRabbit
Build & Packaging
Dependencies
Documentation