-
Notifications
You must be signed in to change notification settings - Fork 197
Refactor http and websocket implementations into its own crate #1229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jhugman
wants to merge
7
commits into
main
Choose a base branch
from
jhugman/introduce-livekit-net
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f7ec1e2
feat(livekit-net): pluggable, host-providable transport crate
jhugman 4cadc82
refactor(livekit-api): route signalling through the livekit-net seam
jhugman 346e9b9
feat(livekit): add foreign transport backend feature
jhugman 9f2988e
feat(livekit-uniffi): host-injectable transport via setPlatformTransport
jhugman cf7a81d
ci: cover the transport seam; document workspace runtime invariant
jhugman 37585c3
refactor(livekit-api): richer, non_exhaustive SignalError
jhugman 2ba17de
chore(release): changeset for transport seam; register livekit-net wi…
jhugman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| livekit-api: major | ||
| livekit: major | ||
| 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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
majorwhen under version1.0.0actually meansminor. So, I think this is ok.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL