tauri-plugin-webrtc WebRTC for Tauri on Linux GitHub

Matrix clients

The plugin was built for Matrix clients packaged with Tauri. Tchap, the French government's messenger, is the worked example: its whole integration is three small changes.

The Tchap integration

1. Dependency, Linux only

# src-tauri/Cargo.toml
[target.'cfg(target_os = "linux")'.dependencies]
# WebKitGTK ships without WebRTC; the plugin supplies it through a native engine.
# Pure Rust throughout: TURN over TLS with RustCrypto, and post-quantum key
# agreement (X25519MLKEM768) with moduletto.
tauri-plugin-webrtc = { git = "https://github.com/crabnebula-dev/tauri-plugin-webrtc", branch = "main",
    default-features = false, features = ["turn-tls-rustcrypto", "pq-moduletto"] }

2. Plugin, Linux only

// src-tauri/src/lib.rs
#[cfg(target_os = "linux")]
{
    builder = builder.plugin(tauri_plugin_webrtc::init());
}

3. Capability, Linux only

// src-tauri/capabilities/linux.json
{
  "identifier": "linux-capability",
  "platforms": ["linux"],
  "windows": ["main"],
  "permissions": ["webrtc:default"]
}

No web code changes. The Element Web code inside Tchap sees RTCPeerConnection and enables calls.

What works

Call typePathTested
1:1 voice and videomatrix-js-sdk MatrixCall, peer to peer or through TURNThe app and Chromium as two users on a Synapse fixture, calls in both directions with audio and video checked
Group callsElement Call widget, LiveKit SFUThe app and Chromium in one LiveKit room, plain and with end-to-end encryption, also from an iframe
Screen sharegetDisplayMedia track on a senderA screen-share renegotiation inside the 1:1 call test; sent at up to 1080p and 15 fps

The harnesses drive Tchap builds that carry a small test hook; see Testing. A full manual check in the Element Web interface, with echo, controls and three-person Element Call rooms, is still open.

What matters to a Matrix client

Other Tauri apps

Nothing here is specific to Matrix. Any page that uses the standard API works the same way: a LiveKit client, a WebRTC data channel app, or a SIP-over-WebSocket softphone that needs DTMF.