livekit_uniffi 0.2.2
livekit_uniffi: ^0.2.2 copied to clipboard
Dart bindings for the LiveKit Rust SDK core, delivered as a prebuilt native library via Native Assets.
0.2.2 - 2026-10-07 #
Fixes #
- Increase the local and remote data track event buffers so a burst of track lifecycle events cannot fill the channel and deadlock room disconnect.
0.2.1 - 2026-09-24 #
Fixes #
- Format the generated Swift bindings with swiftformat when building the Swift package.
- Upgrade to prost 0.14 across the whole project - #1447 (@1egoman)
0.2.0 - 2026-09-22 #
Breaking Changes #
VideoGrants gains the agent grant and Claims the kind claim (with
AccessToken::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.
Features #
EncryptionError::Failed and DecryptionError::Failed carry a reason string and are no longer flat_error,
so a foreign EncryptionProvider or DecryptionProvider returning an error no longer aborts the process with
"Can't lift flat errors" -- a failed data track decrypt (no E2EE manager, key mismatch, corrupt frame) now
drops the frame and leaves the room connected.
Fixes #
- Cleanup unused dependencies
- Fix reliable data channel replay: keep the full retry buffer across resumes, drop duplicate reliable packets, and ignore replayed chunks on uncompressed streams instead of failing with
MissedChunk.
Report the reconnect reason to the server when resuming.
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.
0.1.12 - 2026-09-10 #
Fixes #
Allow code_assets 2.x in the Dart package and stop re-running its build hook
The livekit_uniffi Dart package capped code_assets below 2.0.0, which has since
shipped. Its only breaking change (equality on OS and Architecture) does not
affect the hook, and the cap would make the package unresolvable next to any
dependency that already requires 2.x. The constraint now allows it, and the hook
was verified against code_assets 2.0.0 / hooks 2.2.0.
The hook also registered the downloaded library as a dependency. Dependencies are inputs, so the hooks runner saw a file modified during the build and re-ran the hook, and the download, once on every fresh build. The registration is removed.
The hook also wrote every target's library to the same shared path. A universal
macOS build runs the hook once per architecture and then merges the results with
lipo, which failed because the second download had overwritten the first. Each
target now gets its own subdirectory.
0.1.11 - 2026-09-09 #
Fixes #
- Re-baseline the iOS and Android binary size budgets, which had fallen behind the shipping binaries and blocked the 0.1.10 release.
Moves the RPC implementation into a new livekit-rpc crate, alongside the existing
livekit-data-stream and livekit-datatrack crates.
Breaking: the livekit::rpc module is gone. The RPC types it held are unchanged and
still re-exported from livekit::participant and the prelude, so most code needs no edit;
code that spelled the module out (use livekit::rpc::RpcError;) should import from
livekit::participant or the prelude instead. RpcClientManager, RpcServerManager and
HandleRequestOptions remain reachable under livekit::participant but are now
#[doc(hidden)]: they are internal SDK API and were never usable without the (private)
transport trait.
Within the livekit crate itself, RPC types are now imported from livekit-rpc directly
rather than through those re-exports.
The new crate does not depend on libwebrtc, so its unit tests run without building WebRTC.
The transport seam that made this possible was already in place; the only change to it is
that RpcTransport::publish_data now returns a message-only RpcTransportError instead of
livekit::RoomError, mirroring livekit_data_stream::api::SendError.
Also fixes four latent bugs found while moving the code:
- An RPC call to a participant who disconnects mid-call now fails promptly with
RecipientDisconnected. Pending calls were never purged on disconnect, so the caller waited out its full response timeout (15s by default) and gotResponseTimeoutinstead. - A server reporting a version that is not valid semver no longer panics the calling task. An unparseable version is no longer treated as evidence that the server is too old.
- A v1
RpcResponsecarrying a compressed payload, or no value at all, now fails with anApplicationErrorinstead of resolving the caller with an empty successful response. - Removed an unguarded
unwrapwhen building a v1 response packet, by giving the function a signature that cannot represent the invalid state.
Also drops the semver dependency from livekit, which was only used by the RPC client.
0.1.10 - 2026-09-08 #
Features #
- Removes livekit-runtime and converts this package to be tokio only again - #1375 (@1egoman)
Fixes #
- Add data streams v2 to exposed uniffi interface - #1286 (@1egoman)
- Lower the Android UniFFI AAR minSdk from 24 to 21
- Add the
PASSTHROUGHencoding preset and remove the unusedUpdateEgressRequestfrom the generated protocol - Add
self_test_http_get/self_test_ws_echo/has_http_client/has_ws_clientUniFFI exports so foreign hosts can exercise the transport seam end-to-end. - Attach Dart/Flutter cdylib assets to releases and prepare livekit_uniffi for pub.dev publishing
- Update Android's JNA dependency version to 5.19.1 to support 16KB page sizes
0.1.9 - 2026-08-25 #
Fixes #
- differentiate signal connection errors correctly from timeouts - #1234 (@lukasIO)
- Expose
RemoteDataTrack.set_pipeline_optionsandRemoteDataTrackPipelineOptions(max_partial_frames) over UniFFI, matching the JS and Rust SDKs - Register the
BytesUniFFI custom type once inlivekit-commonand borrow it from each component withuniffi::use_remote_type!, so the converter is emitted once and the post-generation Swift workaround is no longer needed
Moves access-token generation and verification into a new 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.
0.1.8 - 2026-08-03 #
Fixes #
- Add a unified
EgressClient::start_egressthat calls the v2Egress.StartEgressRPC with aStartEgressRequest, alongside the existing per-type helpers. - Fix the Android AAR build. Two cargo-make bugs kept
cargo make --profile release android-packagefrom ever producing a release artifact: the per-arch tasks'env = { TARGET = ... }replaced (rather than merged) the parent env map, dropping the--releaseflag, and theTARGETthey set leaked into the Kotlin bindgen's host build, which then cross-compiled with the host linker. Also raise the Swift and Android size budgets to match the binaries as they stand since the data-track UniFFI surface landed, and check out the released tag rather than the dispatch ref when building the wrapper packages.
0.1.7 - 2026-07-29 #
Fixes #
- Caching of tokio backend reqwest http client - #1285 (@MaxHeimbrock)
- Add data streams v2 - #1192 (@1egoman)
0.1.6 - 2026-07-27 #
Fixes #
- Data tracks schema metadata support.
- Gate the uniffi
clifeature (clap + bindgen backends) behind an opt-in feature so it is no longer compiled into shipped library builds, shrinking the static archive by ~43 MiB. The dynamic library is byte-unchanged. - #1275 (@jhugman)
Route LiveKit signalling through a pluggable transport (new 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::WsErroris removed —tungsteniteis no longer part of the public API. A failed WebSocket handshake now surfaces its HTTP status asSignalError::Client/Server; transport connection and close failures surface as the newSignalError::Connection(String)/SignalError::Closedvariants (previously all collapsed intoTimeout).SignalErroris now#[non_exhaustive], and gains aSignalError::TransportNotConfiguredvariant — returned when no transport is registered (host/foreign builds must calllivekit_net::set_ws_client/set_http_clientbefore connecting). This is a permanent configuration error; callers must not retry.- The signalling WebSocket/HTTP/TLS crates are no longer transitive dependencies of
livekit-api; TLS features delegate tolivekit-net. Existingsignal-client-tokio/-async/-dispatcherand TLS feature names are unchanged.