Skip to content

chore(voice): Phase 8 — bump webrtc-rs stack 0.11 → 0.17#567

Draft
Detair wants to merge 2 commits into
mainfrom
chore/webrtc-stack-bump
Draft

chore(voice): Phase 8 — bump webrtc-rs stack 0.11 → 0.17#567
Detair wants to merge 2 commits into
mainfrom
chore/webrtc-stack-bump

Conversation

@Detair

@Detair Detair commented May 13, 2026

Copy link
Copy Markdown
Owner

DRAFT — needs three-client canary before mark-ready

Phase 8 of the dep-update sweep — the plan's highest-risk phase. Surprisingly the API migration surface turned out to be tiny: just one struct field removal on the server side.

Stack updates

Package From To
webrtc 0.11.0 0.17.1
webrtc-{ice,dtls,sctp,srtp,data,media,mdns,util} 0.x 0.17.1
rtp, rtcp, sdp, stun, turn 0.x 0.17.1
vpx-encode 0.3.0 0.6.2
env-libvpx-sys 4 5 (+ generate feature)

What changed

server/src/voice/sfu.rsRTCIceServer lost its credential_type field in webrtc-rs 0.15.x (per W3C dict, only password creds remain). Removed the explicit field. Client-side RTCIceServer construction already used ..Default::default() so it's forward-compatible without changes.

client/src-tauri/vp8-decoder/Cargo.toml — enabled env-libvpx-sys generate feature. v5.x ships bindings only up to libvpx 1.13, but modern distros ship 1.15+. bindgen is already in the workspace tree.

Verification (local, on Linux)

  • cargo build -p vc-server — clean
  • cargo build -p kaiku-vp8-decoder — clean
  • cargo clippy -p vc-server -p vc-crypto -p kaiku-vp8-decoder -- -D warnings — clean
  • cargo test -p vc-crypto — 22/22 passing
  • cargo test -p kaiku-vp8-decoder — 4/4 passing
  • cargo deny check — clean
  • cargo build -p vc-client cannot complete locally due to a pre-existing libspa-0.8.0 FFI mismatch with the installed PipeWire (same error reproduces on main). CI's macOS/Windows/Android Tauri builds will catch any vc-client compile issues.

Canary checklist (required before mark-ready)

Per the plan, this phase requires a 30-minute three-client canary on kaiku.pmind.de before merge:

If any anomaly: revert canary, halt, file an issue.

Deferred follow-ups

  1. PLI workaround re-evaluation — the plan asks whether peer.write_rtcp() reliably delivers in 0.17 (which would let us drop the interval-PLI workaround in server/src/voice/sfu.rs:607-625). Needs a focused test or live verification. Left as a separate PR to keep this bump mechanical.
  2. cargo audit re-run after merge — the bincode 1 advisory may clear via webrtc-dtls 0.17's bumped pin. Document delta.
  3. 72-hour soak after merge per the plan — voice regressions can be slow to surface.

Plan deviations

  1. Migration surface was 1 line, not the multi-day "audit every release note" exercise the plan anticipated. webrtc-rs is more API-stable across 0.11→0.17 than expected.
  2. env-libvpx-sys generate feature wasn't flagged in the plan but is required against modern libvpx 1.15+.

🤖 Generated with Claude Code

Detair and others added 2 commits May 13, 2026 21:34
WebRTC stack update for the dep-update sweep — the plan's highest-risk
phase, but the actual API migration surface was much smaller than the
6-major version delta suggested.

  webrtc         0.11.0 → 0.17.1
  webrtc-{ice,dtls,sctp,srtp,data,media,mdns,util}  0.x → 0.17.1
  rtp, rtcp, sdp, stun, turn  0.x → 0.17.1
  vpx-encode      0.3.0  → 0.6.2
  env-libvpx-sys  4      → 5      (+ `generate` feature)

## API migration

### server/src/voice/sfu.rs
`RTCIceServer` lost its `credential_type` field in webrtc-rs 0.15.x
(per the W3C RTCIceServer dictionary, which only defines password
credentials). Removed the explicit field; `..Default::default()` in
callers already produced forward-compatible code at the other
construction site (client/src-tauri/src/webrtc/mod.rs).

### client/src-tauri/vp8-decoder/Cargo.toml
env-libvpx-sys 5.x ships pre-generated FFI bindings only up to libvpx
1.13.0, but modern distros (Arch, Fedora 41+) ship libvpx 1.15/1.16.
Enabled the `generate` feature so bindgen produces bindings against
the installed libvpx headers at build time. Adds no new host-tooling
requirement — bindgen already in the workspace dep tree via other
crates.

## Verification

Locally on Linux (libspa env-mismatch blocks vc-client locally; CI
will validate vc-client on macOS/Windows/Android):

- [x] `cargo build -p vc-server` — clean (46.5s)
- [x] `cargo build -p kaiku-vp8-decoder` — clean
- [x] `cargo clippy -p vc-server -p vc-crypto -p kaiku-vp8-decoder -- -D warnings` — clean
- [x] `cargo test -p vc-crypto` — 22/22 passing
- [x] `cargo test -p kaiku-vp8-decoder` — 4/4 passing
- [x] `cargo deny check` — advisories/bans/licenses/sources all ok

## Deferred (per plan)

- **PLI workaround re-evaluation (Task 8.4)**: not performed. The plan
  asks whether `peer.write_rtcp()` reliably delivers in 0.17 (which
  would let us drop the interval-PLI workaround in sfu.rs:607-625).
  This needs a focused test or live verification — left as a separate
  follow-up PR to keep this bump mechanical.
- **Multi-platform canary (Task 8.5)**: out of scope for code changes;
  see DRAFT PR checklist.

## Plan deviations
1. Migration surface was 1 line (RTCIceServer field removal) on the
   server side — far smaller than the plan's "audit every release note
   0.12→0.17 and catalog API breakage in advance" suggested. webrtc-rs
   is more API-stable across this delta than the plan anticipated.
2. env-libvpx-sys `generate` feature was not flagged in the plan but
   is required against modern libvpx; documented in the Cargo.toml.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
env-libvpx-sys 5.x with the `generate` feature (enabled in the
vp8-decoder Cargo.toml because libvpx >= 1.14 has no pre-shipped
bindings) runs bindgen against the installed libvpx headers. bindgen
needs libclang plus a clang toolchain that can find C stdlib headers
(stddef.h etc.); without it the build fails on `vpx_integer.h` →
`<stddef.h>` resolution.

Three workflow places that compile vp8-decoder on Linux:
- ci.yml rust-lint (clippy)
- ci.yml rust-test
- ci.yml tauri (ubuntu-latest)
- tauri-build.yml (ubuntu Tauri build)

Added `clang libclang-dev` to each apt install. Windows and macOS
Tauri builds use vcpkg / brew toolchains that already bring their
own clang, so no change needed there.

Caught by the Rust Tests CI run on PR #567 (Phase 8 webrtc bump),
which compiled vp8-decoder with the `generate` feature for the first
time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Detair Detair force-pushed the chore/webrtc-stack-bump branch from 44a593c to e17784c Compare May 13, 2026 19:37
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