Skip to content

Conversation

@ladvoc
Copy link
Contributor

@ladvoc ladvoc commented Jan 29, 2026

Use the workspace-level Cargo.toml as the single source of truth for shared metadata (such as Rust edition and license) and for common dependencies to avoid version fragmentation across crates.

Summary by CodeRabbit

  • Chores
    • Centralized build configuration and dependency management across the project.

✏️ Tip: You can customize this high-level summary in your review settings.

@ladvoc ladvoc requested a review from cloudwebrtc January 29, 2026 22:57
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

This pull request consolidates Cargo dependency management by introducing a workspace-level configuration with shared versions and metadata, then converting all example crates and libraries across the repository to use workspace-scoped dependencies instead of per-crate version pinning.

Changes

Cohort / File(s) Summary
Root Workspace Configuration
Cargo.toml
Introduces new [workspace.package] section with edition, repository, and license; adds comprehensive [workspace.dependencies] with versions for ~30 common dependencies (anyhow, bytes, clap, tokio, serde, etc.); extends [profile.release] with optimization settings (codegen-units, panic, strip, debug).
Example Crate Dependencies
examples/agent_dispatch/Cargo.toml, examples/api/Cargo.toml, examples/basic_room/Cargo.toml, examples/basic_text_stream/Cargo.toml, examples/encrypted_text_stream/Cargo.toml, examples/local_audio/Cargo.toml, examples/local_video/Cargo.toml, examples/mobile/Cargo.toml, examples/play_from_disk/Cargo.toml, examples/rpc/Cargo.toml, examples/save_to_disk/Cargo.toml, examples/screensharing/Cargo.toml, examples/send_bytes/Cargo.toml, examples/webhooks/Cargo.toml, examples/wgpu_room/Cargo.toml
Convert edition to edition.workspace = true and replace explicit dependency versions with workspace = true references; preserve existing feature flags across all crates.
Core Library Dependencies
libwebrtc/Cargo.toml, livekit-api/Cargo.toml, livekit-ffi/Cargo.toml, livekit-protocol/Cargo.toml, livekit-runtime/Cargo.toml, livekit-uniffi/Cargo.toml, livekit/Cargo.toml
Migrate edition, license, and repository fields to workspace-scoped references; convert all dependencies (tokio, serde, log, futures-util, etc.) from versioned specs to workspace = true while maintaining feature selections.
Build & FFI System Crates
livekit-ffi-node-bindings/Cargo.toml, webrtc-sys/Cargo.toml, webrtc-sys/build/Cargo.toml, soxr-sys/Cargo.toml, yuv-sys/Cargo.toml, imgproc/Cargo.toml
Switch edition, license, and repository to workspace-scoped declarations; convert dependencies to workspace-managed references; webrtc-sys adds explicit build-dependencies (cxx-build, glob, cc) alongside workspace-backed entries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • cloudwebrtc
  • pblazej
  • davidliu

Poem

🐰 Hops with delight across the cargo files,
Workspace dependencies now unified with style!
No more version duplication in sight,
One shared configuration keeps all things right! 📦✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: consolidating workspace dependencies and settings. It is concise, clear, and directly reflects the primary change in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jacobgelman/clt-2440-use-workspace-dependencies-settings

🧹 Recent nitpick comments
soxr-sys/Cargo.toml (1)

4-4: Pre-existing typo in authors field.

The email address is missing a closing angle bracket: "theo.8bits@gmail.com" should be "theo.8bits@gmail.com>". This is not introduced by this PR but could be fixed opportunistically.

🔧 Suggested fix
-authors = ["Theo Monnom <theo.8bits@gmail.com"]
+authors = ["Theo Monnom <theo.8bits@gmail.com>"]
📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7c19ce and cc8ea10.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (29)
  • Cargo.toml
  • examples/agent_dispatch/Cargo.toml
  • examples/api/Cargo.toml
  • examples/basic_room/Cargo.toml
  • examples/basic_text_stream/Cargo.toml
  • examples/encrypted_text_stream/Cargo.toml
  • examples/local_audio/Cargo.toml
  • examples/local_video/Cargo.toml
  • examples/mobile/Cargo.toml
  • examples/play_from_disk/Cargo.toml
  • examples/rpc/Cargo.toml
  • examples/save_to_disk/Cargo.toml
  • examples/screensharing/Cargo.toml
  • examples/send_bytes/Cargo.toml
  • examples/webhooks/Cargo.toml
  • examples/wgpu_room/Cargo.toml
  • imgproc/Cargo.toml
  • libwebrtc/Cargo.toml
  • livekit-api/Cargo.toml
  • livekit-ffi-node-bindings/Cargo.toml
  • livekit-ffi/Cargo.toml
  • livekit-protocol/Cargo.toml
  • livekit-runtime/Cargo.toml
  • livekit-uniffi/Cargo.toml
  • livekit/Cargo.toml
  • soxr-sys/Cargo.toml
  • webrtc-sys/Cargo.toml
  • webrtc-sys/build/Cargo.toml
  • yuv-sys/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Test (x86_64-unknown-linux-gnu)
  • GitHub Check: Test (x86_64-apple-darwin)
  • GitHub Check: Test (x86_64-pc-windows-msvc)
  • GitHub Check: Build (x86_64-apple-darwin)
  • GitHub Check: Build (aarch64-unknown-linux-gnu)
  • GitHub Check: Build (aarch64-linux-android)
  • GitHub Check: Build (x86_64-linux-android)
  • GitHub Check: Build (armv7-linux-androideabi)
  • GitHub Check: Build (x86_64-unknown-linux-gnu)
  • GitHub Check: Build (aarch64-apple-ios-sim)
  • GitHub Check: Build (aarch64-apple-darwin)
  • GitHub Check: Build (aarch64-pc-windows-msvc)
  • GitHub Check: Build (aarch64-apple-ios)
  • GitHub Check: Build (x86_64-pc-windows-msvc)
🔇 Additional comments (36)
imgproc/Cargo.toml (1)

4-6: LGTM!

The workspace edition inheritance is correctly configured. Note that license remains explicitly set here while some other crates in this PR use license.workspace = true — this appears intentional if this crate maintains its own licensing terms.

livekit-uniffi/Cargo.toml (1)

7-10: LGTM!

The workspace metadata and dependency migrations are correctly implemented. The tokio dependency appropriately specifies only the ["sync"] feature needed by this crate while inheriting the version from the workspace.

Also applies to: 18-19

yuv-sys/Cargo.toml (1)

4-4: LGTM!

The workspace edition inheritance is correctly configured. Build dependencies remaining with explicit versions is reasonable for this sys crate.

examples/save_to_disk/Cargo.toml (1)

4-4: LGTM!

The workspace migrations are correctly implemented for this example crate. The tokio dependency appropriately retains the ["full"] feature set needed for the example.

Also applies to: 8-11

examples/send_bytes/Cargo.toml (1)

4-4: LGTM!

The workspace migrations are correctly implemented. Dependencies specific to this example (bitfield-struct, colored) appropriately remain with explicit versions.

Also applies to: 8-8, 10-11, 13-13

examples/rpc/Cargo.toml (1)

4-4: LGTM!

The workspace migrations are correctly implemented for this example crate, consistent with the patterns used in other examples.

Also applies to: 8-9, 12-14

soxr-sys/Cargo.toml (1)

5-6: LGTM!

The workspace edition and license inheritance are correctly configured.

examples/play_from_disk/Cargo.toml (1)

4-12: LGTM.

examples/basic_text_stream/Cargo.toml (1)

4-12: LGTM.

livekit-ffi-node-bindings/Cargo.toml (1)

2-20: LGTM.

examples/local_audio/Cargo.toml (1)

4-17: LGTM.

examples/agent_dispatch/Cargo.toml (1)

4-13: LGTM.

examples/screensharing/Cargo.toml (1)

4-13: LGTM.

livekit-protocol/Cargo.toml (1)

4-23: Workspace inheritance is properly configured.

Verification confirms that [workspace.package] defines edition, license, and repository, and [workspace.dependencies] defines all referenced dependencies (tokio, futures-util, parking_lot, serde, thiserror, livekit-runtime). The build will succeed without errors.

Cargo.toml (3)

35-38: Workspace package metadata consolidation looks good.
Consistent edition/repository/license across members is a solid improvement.


53-70: Workspace dependency centralization looks good.
Keeps versions aligned across crates and reduces drift.


72-78: Release profile tuning looks intentional and consistent.
No concerns with these settings in a centralized workspace setup.

examples/basic_room/Cargo.toml (1)

4-12: Workspace-scoped metadata and deps look good.
Keeps the example aligned with the workspace strategy.

examples/api/Cargo.toml (1)

4-9: Workspace metadata and tokio dependency migration looks good.
Feature flags preserved as expected.

examples/encrypted_text_stream/Cargo.toml (1)

4-13: Workspace dependency migration is consistent and clean.
Features and defaults are preserved.

examples/local_video/Cargo.toml (1)

4-43: Workspace-based dependency updates look good.
No issues with the migration in this manifest.

examples/mobile/Cargo.toml (1)

4-11: Workspace metadata/deps migration looks good.
No concerns in this manifest update.

webrtc-sys/build/Cargo.toml (1)

4-16: Workspace-scoped metadata and dependency look good.
Aligns with the workspace’s centralized configuration.

libwebrtc/Cargo.toml (2)

20-23: Workspace dependency migration looks consistent.

Features and defaults are preserved while centralizing versions.

Also applies to: 34-36, 60-60


4-4: The workspace package metadata is properly defined in the root Cargo.toml with [workspace.package] section containing edition, license, and repository fields. Switching to *.workspace = true in libwebrtc/Cargo.toml is safe and will not cause manifest resolution errors.

examples/webhooks/Cargo.toml (1)

4-4: LGTM: workspace edition and tokio reuse.

Also applies to: 10-10

livekit-runtime/Cargo.toml (1)

4-7: LGTM: workspace metadata and dependency consolidation.

Also applies to: 21-26, 31-31

livekit/Cargo.toml (1)

4-7: LGTM: workspace metadata and dependency migration.

Also applies to: 34-41, 45-45, 49-49

webrtc-sys/Cargo.toml (1)

4-8: LGTM: workspace metadata and logging deps.

Also applies to: 15-15, 28-28

livekit-ffi/Cargo.toml (1)

4-7: LGTM: workspace dependency alignment across FFI crate.

Also applies to: 27-33, 35-35, 37-38, 46-46

examples/wgpu_room/Cargo.toml (1)

4-4: LGTM: workspace metadata and dependency consolidation.

Also applies to: 12-12, 15-15, 17-17, 23-26

livekit-api/Cargo.toml (5)

4-7: Workspace package metadata is properly defined.

The workspace manifest correctly defines license (Apache-2.0), edition (2021), and repository (https://github.com/livekit/rust-sdks), so inheriting these in livekit-api/Cargo.toml lines 4–7 is safe for builds and publishing.


104-104: No action required. The workspace rand version is 0.9, which is compatible with all API usage in the crate (rand::Rng, rand::rng(), and .random::<u8>()). Using { workspace = true } maintains compatibility with the workspace specification.


73-78: Workspace dependency entries confirmed present and correctly composed.

All four dependencies are properly defined in the workspace manifest:

  • thiserror = "1"
  • serde = "1" (features added per-crate as needed)
  • log = "0.4"
  • parking_lot = "0.12"

The serde feature specification in livekit-api (features = ["derive"]) correctly layers on top of the workspace version without conflicts.


83-83: Workspace serde_json configuration is correct for webhook payload handling.

The workspace definition (serde_json = "1.0") provides all required functionality. Webhook deserialization only uses basic serde_json::from_str() parsing, which requires no special features beyond the default feature set. The optional dependency in livekit-api is appropriately gated behind the webhooks feature.


93-96: Workspace tokio/futures-util configuration is compatible.

The workspace versions (tokio = "1", futures-util = "0.3") align with the requested features (sync, macros, signal, io-util, net, sink). All specified features are valid for these versions. The explicit default-features = false with feature selection is correct.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Comment @coderabbitai help to get the list of available commands and usage tips.

@ladvoc ladvoc requested a review from xianshijing-lk January 30, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants