qrtc
A pure Rust WebRTC engine with hybrid post-quantum key agreement. qrtc implements the network side of a peer connection behind two traits, so an application or browser can expose it as the W3C RTCPeerConnection API.
Pure RustNo libwebrtc, no GStreamer, no system packages. With
turn-tls-rustcrypto the build compiles no C.Post-quantumDTLS 1.3 and TURN over TLS with X25519MLKEM768, interoperable with Chromium and OpenSSL 3.5.
Real stacksTested against Chromium, LiveKit with E2EE, matrix-js-sdk calls and coturn.
Two consumerstauri-plugin-webrtc for WebKitGTK apps, and formal-web as a native browser engine.
What it covers
| Area | Coverage |
|---|---|
| JSEP | Offers, answers, renegotiation, rollback and perfect negotiation, ICE restart, setCodecPreferences |
| ICE | Host candidates as mDNS .local names (answered and resolved), STUN, TURN over UDP, TCP and TLS, relay-only policy |
| DTLS | DTLS 1.2, or DTLS 1.3 with post-quantum key exchange groups |
| Data channels | Reliable and unreliable, ordered and unordered, negotiated ids, buffered-amount events |
| Audio | Opus with in-band FEC, AEC3 echo cancellation, noise suppression and AGC, adaptive jitter buffer, one playout clock, DTMF (RFC 4733) |
| Video | VP8 and H.264 transport, keyframe requests, bandwidth estimation; the consumer encodes and decodes |
| Encoded transforms | Hooks for RTCRtpScriptTransform, used for LiveKit end-to-end encryption |
| Stats | Peer connection, transport (DTLS state, tlsGroup), candidate pairs, local and remote candidates |
Quick start
[dependencies]
qrtc = { git = "https://github.com/crabnebula-dev/qrtc", branch = "main" }
use qrtc::{native::NativeEngine, PeerEngine, RtcConfiguration};
use std::sync::Arc;
let engine = NativeEngine::new()?;
let peer = engine.create_peer(
&RtcConfiguration::default(),
Arc::new(|event| println!("{event:?}")),
)?;
let offer = peer.create_offer()?;
peer.set_local_description(&offer)?;
Every method blocks. On an async runtime, call them from a blocking pool. Events arrive in order per peer connection, on engine threads. Using the API walks through a whole connection.
Where to go next
- Architecture: the driver task, sockets, and how str0m fits in.
- Features in depth: how each area works and what it does not do yet.
- Post-quantum key agreement: groups, policies and the DTLS changes behind them.
- Vendored crates: what qrtc changes in str0m and dimpl, and why.
- Testing and CI: unit tests, interop suites and release checks.
- Security and compliance: advisories, SBOM and the steward statement.