rust/ becomes a standalone static binary (blax-webrtc-sfu, tokio-free
std-thread loop on str0m): terminates ICE/DTLS/SRTP, forwards Opus between
room peers without decoding, records per-peer Ogg/Opus (ffprobe-verified),
server-side mute/kick, stats + peer_connected/peer_left usage events, all
driven by PHP over a JSON-lines Unix control socket. Renegotiation rides the
browser data channel (str0m chat model) — signaling only carries the initial
offer/answer.
PHP side: RustMediaEngine (MediaEngine contract + room-aware API) is
plug-and-play — first use downloads the sha256-verified prebuilt binary
(BinaryManager, RoadRunner pattern) and spawns it detached, flock-guarded
(SidecarSupervisor). webrtc:install / webrtc:sidecar provided for explicit
control; config gains the webrtc.sfu block. Replaces the ext-php-rs
Str0mMediaEngine seam.
Tests: 61 PHP (incl. a real PHP<->Rust E2E that spawns the sidecar from
PHPUnit) + 7 Rust (incl. an end-to-end control-socket integration test).
build-release.sh produces the static-musl release + .sha256 (verified:
static-pie, 9.2MB, runs).
Card #1083 (rel #1051#1060#1064).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
WebRTC for Laravel on blax-software/reactphp-kernel. PHP owns signaling +
orchestration; a pluggable MediaEngine owns real-time media, with the production
engine backed by a Rust core (str0m via ext-php-rs) so PHP never runs per-20ms DSP.
- WebRtcServiceProvider + config/webrtc.php + webrtc:serve command
- Contracts\MediaEngine (offer/ice/record/connect/bridge/close)
- Media\NullMediaEngine (signaling-only) + Media\Str0mMediaEngine (Rust seam)
- Signaling\SignalingHandler (transport-agnostic) + Server\SignalingServer (on the kernel)
- rust/ crate stub (blax_webrtc: str0m + ext-php-rs) documenting the media plan
Enables: server-side record/intercept, provider-hidden AI-realtime bridging,
and party-to-party/group calls. rel learn-atc #1055#1051#1019
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>