Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .changeset/livekit-net-transport-seam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
livekit-api: major
livekit: major
Comment on lines +2 to +3

@1egoman 1egoman Jul 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Should this be a major version bump? For a user of the rust crates directly (ie, not via livekit-ffi / livekit-uniffi), what about this change is breaking?

UPDATE: talked to lukas about this, I forgot that knope has some unintuitive behavior where major when under version 1.0.0 actually means minor. So, I think this is ok.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

livekit-uniffi: minor
---

Route LiveKit signalling through a pluggable, host-providable transport (new `livekit-net` crate).

The signalling WebSocket and the two pre-connect HTTP GETs (validate, region discovery) now go through a transport trait resolved from a process-global registry, so mobile/UniFFI builds can drop the Rust TLS/WebSocket/HTTP stack and use the platform's network stack. Native desktop 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]`.
- The signalling WebSocket/HTTP/TLS crates are no longer transitive dependencies of `livekit-api`; TLS features delegate to `livekit-net`. Existing `signal-client-tokio` / `-async` / `-dispatcher` and TLS feature names are unchanged.

`livekit` adds a `foreign` feature that pairs the backend-agnostic signalling client with a host-provided transport.

`livekit-uniffi` gains `setPlatformTransport` so a Dart/Swift/Kotlin host can inject its own transport across the UniFFI boundary, and drops the services (reqwest) stack from the cdylib.
7 changes: 7 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-target-${{ matrix.target }}-

# Runtime-invariant: livekit (desktop) is tokio-only; livekit-uniffi uses
# the foreign+tokio feature pair, which also resolves to tokio at the
# livekit-runtime layer. Both crates therefore satisfy the one-runtime
# guard when built together via --workspace.
# IMPORTANT: a future cdylib that uses foreign+dispatcher/async-std MUST
# NOT share this --workspace invocation; use its own build job (like the
# uniffi-cdylib.yml `-p livekit-uniffi` job) so the runtimes do not clash.
- name: Build (Cargo)
if: ${{ !contains(matrix.target, 'android') }}
run: |
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,12 @@ jobs:
--features __lk-e2e-test \
-- \
--nocapture \
--test-threads=1
--test-threads=1

- name: Test transport seam (livekit-net / signal-client / uniffi)
shell: bash
run: |
cargo test --verbose --target ${{ matrix.target }} -p livekit-net --features native-tokio
cargo test --verbose --target ${{ matrix.target }} -p livekit-net --features foreign
cargo test --verbose --target ${{ matrix.target }} -p livekit-api --features signal-client-tokio
cargo test --verbose --target ${{ matrix.target }} -p livekit-uniffi
Loading