Rust SDKs
npx @buildinternet/releases get livekit-rust-sdksnpx @buildinternet/releases get livekit-rust-sdksAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
VideoGrants gains the agent grant and Claims the kind claim (withAccessToken::with_kind), which the Go, Python and JS SDKs already carry. An
agent worker's token is VideoGrants { agent: true } and a simulated job's
participant token is kind: "agent"; neither could be minted from Rust before.
livekit-uniffi exposes both: TokenOptions.kind, Claims.kind, and agent
on its VideoGrants record.
Breaking: the four grants the server infers when absent -- can_publish,
can_subscribe, can_publish_data, can_update_own_metadata -- are now
Option<bool>, as in the Go and JS SDKs. None leaves the decision to the
server, and the new getters (can_publish(), can_subscribe(),
can_publish_data(), can_update_own_metadata()) read a token the way the
server does, can_publish_data falling back to can_publish included. Code
that set these fields writes Some(..); code that read them uses the getters.
The same fields are optional on the livekit-uniffi record, and
livekit-api re-exports the crate as livekit_api::access_token, so both
carry the change.
Nothing at its default is written into the token any more: unset claims and
grants are omitted, as the server's own omitempty grants are. Verification
of existing tokens is unchanged.
Resumes previously sent no reason, so server-side telemetry could not attribute why Rust
clients reconnect — every resume looked like RR_UNKNOWN. The engine now records what caused
the episode (signal disconnected, publisher failed, subscriber failed) and reports it on each
resume attempt. The v0 signalling path was also missing the reconnect_reason query parameter
entirely, so it would not have been reported even if a reason had been supplied.
PASSTHROUGH encoding preset and remove the unused UpdateEgressRequest from the generated protocolself_test_http_get / self_test_ws_echo / has_http_client / has_ws_client UniFFI exports so foreign hosts can exercise the transport seam end-to-end.livekit-region crate. Nopublic API or behaviour change.
livekit-signaling crate. livekit-apire-exports it under the historical livekit_api::signal_client path, now marked
deprecated: it is internal SDK API, and dependents should use livekit-signaling
directly. livekit-api no longer depends on livekit-net.
Also drops two dependencies that were declared but never used: scopeguard and
bytes.
livekit-token crate.livekit_api::access_token::* continues to resolve to the same types via a
re-export, so no consumer changes are needed.
Also fixes the services-tokio and services-async features, which used the
access-token types without declaring the access-token feature. Building with
--no-default-features --features services-tokio previously failed to compile.
other_sdks field to propagate additional SDK metadata to the server.EgressClient::start_egress that calls the v2 Egress.StartEgress RPC with a StartEgressRequest, alongside the existing per-type helpers.livekit-net crate).The signalling WebSocket and the two pre-connect HTTP GETs (validate, region discovery) now go through pluggable transport traits (WsClient for the WebSocket, HttpClient for request/response) resolved from a process-global registry with independent slots — a consumer can bring only HTTP, or only WebSocket. The new livekit-net crate owns the WebSocket/HTTP/TLS stack behind those traits and ships native (tokio / async-std) backends. Native builds are unchanged in behavior.
Breaking (livekit-api, and livekit via EngineError::Signal):
SignalError::WsError is removed — tungstenite is no longer part of the public API. A failed WebSocket handshake now surfaces its HTTP status as SignalError::Client/Server; transport connection and close failures surface as the new SignalError::Connection(String) / SignalError::Closed variants (previously all collapsed into Timeout).SignalError is now #[non_exhaustive], and gains a SignalError::TransportNotConfigured variant — returned when no transport is registered (host/foreign builds must call livekit_net::set_ws_client / set_http_client before connecting). This is a permanent configuration error; callers must not retry.livekit-api; TLS features delegate to livekit-net. Existing signal-client-tokio / -async / -dispatcher and TLS feature names are unchanged.Apply compression to the initial offer when sending it in the JoinRequest URL, reducing URL size and improving connection performance on slow networks.
livekit-api now installs a minimal in-crate HMAC CryptoProvider
(HS256/384/512) instead of jsonwebtoken's rust_crypto backend, dropping the
unused RSA/EC/EdDSA algorithms. LiveKit access tokens are HS256, so there is no
public API or behavior change. This trims ~200 KiB of unreachable crypto code,
shrinking the shipped binaries ~25–29% — the RustLiveKitUniFFI iOS framework
drops from ~900 KiB to ~672 KiB (arm64) and the Android arm64-v8a .so from
~1.13 MiB to ~816 KiB. livekit-ffi and livekit benefit too.
When connecting to LiveKit Cloud from containers without CA certificates installed, the error message now includes the full error chain (e.g., "invalid peer certificate: UnknownIssuer") instead of just "error sending request for url (...)". This makes TLS certificate issues self-diagnosing.
Also added documentation for TLS features in Cargo.toml, highlighting rustls-tls-webpki-roots as the recommended option for container deployments.
rustls-webpki to 0.103.13, addressing GHSA-82j2-j2ch-gfr8##890 by @chenosaurus
frame_metadata or use VideoFrame::new().##956 by @xianshijing-lk
Before this PR, it uses an unbounded buffer for video stream, that will cause multiple problems: 1, video will be lagged behind if rendering is slow or just wake up from background 2, it will be out of sync with audio
This PRs provides options to set a bounded buffer for video stream, and use 1 buffer as the default option.
##952 by @MaxHeimbrock
Adds os_info crate as dependency and sends the data for client connections.
##917 by @gasmith