Skip to content

Commit dff1720

Browse files
committed
chore: add changeset for the livekit-rpc extraction
1 parent 0417337 commit dff1720

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
livekit-rpc: patch
3+
livekit: patch
4+
livekit-ffi: patch
5+
---
6+
7+
Moves the RPC implementation into a new `livekit-rpc` crate, alongside the existing
8+
`livekit-data-stream` and `livekit-datatrack` crates.
9+
10+
This is fully backwards compatible: `livekit` re-exports the crate at the historical
11+
`livekit::rpc` and `livekit::participant` paths, and the prelude still provides
12+
`PerformRpcData`, `RpcError`, `RpcErrorCode` and `RpcInvocationData`. Within the `livekit`
13+
crate itself, RPC types are now imported from `livekit-rpc` directly rather than through
14+
those re-exports. `RpcClientManager`, `RpcServerManager` and `HandleRequestOptions` remain
15+
reachable but are now `#[doc(hidden)]`: they are internal SDK API and were never usable
16+
without the (private) transport trait.
17+
18+
The new crate does not depend on `libwebrtc`, so its unit tests run without building WebRTC.
19+
The transport seam that made this possible was already in place; the only change to it is
20+
that `RpcTransport::publish_data` now returns a message-only `RpcTransportError` instead of
21+
`livekit::RoomError`, mirroring `livekit_data_stream::api::SendError`.
22+
23+
Also fixes four latent bugs found while moving the code:
24+
25+
- An RPC call to a participant who disconnects mid-call now fails promptly with
26+
`RecipientDisconnected`. Pending calls were never purged on disconnect, so the caller
27+
waited out its full response timeout (15s by default) and got `ResponseTimeout` instead.
28+
- A server reporting a version that is not valid semver no longer panics the calling task.
29+
An unparseable version is no longer treated as evidence that the server is too old.
30+
- A v1 `RpcResponse` carrying a compressed payload, or no value at all, now fails with an
31+
`ApplicationError` instead of resolving the caller with an empty successful response.
32+
- Removed an unguarded `unwrap` when building a v1 response packet, by giving the function
33+
a signature that cannot represent the invalid state.
34+
35+
Also drops the `semver` dependency from `livekit`, which was only used by the RPC client.

0 commit comments

Comments
 (0)