Skip to content
Merged
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
17 changes: 17 additions & 0 deletions .changeset/upgrade_to_prost_0_14_across_the_whole_project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
livekit: patch
livekit-api: patch

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.

🟡 Patch release breaks Twirp callers

With livekit-api marked patch, TwirpClient::request changes its public prost::Message bound from 0.12 to 0.14. Existing callers using 0.12-generated messages no longer compile after a patch upgrade.

Learn more

TwirpClient is publicly re-exported from the services module, and its request methods accept caller-defined types implementing this crate's prost::Message. Traits from prost 0.12 and 0.14 are different Rust types. A caller can therefore satisfy the old bound but not the new one, even when its generated message is otherwise unchanged. Publishing that transition as a patch violates the existing API contract.

Example: An application generates CustomRequest with prost 0.12 and passes it to TwirpClient::request. Updating only livekit-api to this patch release changes the required trait to prost 0.14, so the same call stops compiling.

Recommended fix: Mark livekit-api as a breaking release in the changeset. Also audit every patched crate whose public API exposes livekit-protocol types; moving that dependency to its new major version can create the same downstream type-identity break.

Suggested change
livekit-api: patch
livekit-api: major

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@ladvoc ladvoc Sep 21, 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.

The bindings have been regenerated, but do the changes constitute any breaking API changes? Looking at the diff for the bindings, I only see formatting/syntax differences.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree - it's a similar issue as #1447 (comment)

livekit-capture: patch
livekit-common: patch
livekit-data-stream: patch
livekit-datatrack: patch
livekit-ffi: patch
livekit-uniffi: patch
livekit-protocol: major
livekit-rpc: patch
livekit-signaling: patch
livekit-token: patch
livekit-uniffi: patch
---

Upgrade to prost 0.14 across the whole project - #1447 (@1egoman)
2 changes: 1 addition & 1 deletion .github/workflows/gen-protocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install prost generators
run: cargo install protoc-gen-prost@0.3.1 protoc-gen-prost-serde@0.3.1
run: cargo install protoc-gen-prost@0.5.0 protoc-gen-prost-serde@0.4.0

- name: generate python stubs
run: ./generate_proto.sh
Expand Down
122 changes: 27 additions & 95 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions livekit-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ serde = { workspace = true, features = ["derive"] }
sha2 = "0.10"
url = "2.3"
log = { workspace = true }
prost = "0.12"
pbjson-types = "0.6"
prost = { workspace = true }
pbjson-types = "0.9"

# webhooks
serde_json = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion livekit-data-stream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bytes = { workspace = true }
tokio = { workspace = true, default-features = false, features = ["sync", "fs", "io-util", "rt"] }
tokio-stream = { workspace = true, features = ["sync"] }
futures-util = { workspace = true, default-features = false, features = ["sink", "io"] }
prost = "0.12"
prost = { workspace = true }
chrono = { workspace = true }
bmrng = "0.5.2"
uuid = { version = "1", features = ["v4"] }
Expand Down
6 changes: 3 additions & 3 deletions livekit-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ description = "Livekit protocol and utilities for the Rust SDK"
repository.workspace = true

[dependencies]
prost = "0.12"
prost = { workspace = true }
serde = { workspace = true }
pbjson = "0.6"
pbjson-types = "0.6"
pbjson = "0.9"
pbjson-types = "0.9"

# How CI checks this crate's features, read by
# `.github/workflows/feature-combinations-curated.yml` via `cargo metadata`.
Expand Down
4 changes: 3 additions & 1 deletion livekit-protocol/generate_proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# dependencies: cargo install protoc-gen-prost@0.3.1 protoc-gen-prost-serde@0.3.1
# dependencies: cargo install protoc-gen-prost@0.5.0 protoc-gen-prost-serde@0.4.0


PROTOCOL=protocol/protobufs
Expand All @@ -24,8 +24,10 @@ protoc \
--prost_out=$OUT_RUST \
--prost_opt=compile_well_known_types \
--prost_opt=extern_path=.google.protobuf=::pbjson_types \
--prost_opt=flat_output_dir \
--prost-serde_out=$OUT_RUST \
--prost-serde_opt=ignore_unknown_fields \
--prost-serde_opt=flat_output_dir \
$PROTOCOL/livekit_egress.proto \
$PROTOCOL/livekit_rtc.proto \
$PROTOCOL/livekit_room.proto \
Expand Down
Loading
Loading