What Are the Dependencies for Jellium-Desktop? A Complete Cargo Workspace Guide
Jellium-Desktop depends on 14 external Rust crates centralized in the workspace src/Cargo.toml, including CEF for embedding the Jellyfin web interface, platform-specific bindings for Windows and macOS, and zbus for Linux media session integration.
Jellium-Desktop is a Rust-based desktop client for Jellyfin that organizes its build configuration as a Cargo workspace. The project centralizes all third-party dependencies for jellium-desktop in the root src/Cargo.toml file, specifically within the [workspace.dependencies] table spanning lines 36-49, enabling consistent versioning across its platform-specific sub-crates.
Workspace Dependency Configuration
The project uses a Cargo workspace structure to share dependency versions across multiple internal crates. According to the andrewrabert/jellium-desktop source code, the file src/Cargo.toml defines a [workspace.dependencies] section that pins exact versions for all external crates used by the application.
This centralized approach ensures that platform-specific members like src/macos/, src/windows/, and src/mpris/ all reference the same dependency versions without duplicating version strings.
Complete Dependency Breakdown
The following 14 crates constitute the external dependency graph for jellium-desktop:
Cross-Platform Core Dependencies
- cef (
=150.0.0, default features disabled): Provides the Chromium Embedded Framework used to embed the Jellyfin web UI as an off-screen browser. - serde_json (
1): Handles JSON serialization for communication between the Rust backend and the embedded web interface. - slotmap (
1): Implements an efficient map structure for storing opaque handles such as texture IDs and user sessions. - tempfile (
3): Manages secure temporary file creation for intermediate assets like shaders. - tracing (
0.1): Provides structured, async-aware logging and diagnostics throughout the application. - parking_lot (
0.12): Supplies fast mutex and RwLock implementations for synchronization across the codebase. - gix (
0.85, features["status","sha1"]): Lightweight Git library for handling submodule updates and repository status checks.
Windows-Specific Dependencies
The Windows platform implementation relies on three complementary crates defined in lines 46-48:
- windows (
0.62): High-level Windows API bindings for window creation and message handling. - windows-core (
0.62): Low-level core bindings required for certain FFI calls. - windows-sys (
0.61): Thin#[link]-style system bindings used by thewindowscrate.
macOS-Specific Dependencies
macOS integration requires Objective-C bindings configured in lines 38-39 and 41:
- objc2 (
0.6): Safe Rust bindings for Objective-C, enabling macOS-specific APIs for window handling and menu integration. - objc2-foundation (
0.3): Foundation framework bindings required to work with Cocoa objects. - libc (
0.2): Bindings to the C standard library for low-level OS interactions.
Linux-Specific Dependencies
Linux builds include D-Bus support for media key handling:
- zbus (
5, features["async-io","blocking-api"]): Asynchronous D-Bus client used for MPRIS integration, enabling media-key handling and playback control.
How Workspace Dependencies Work
When building any crate in the workspace, Cargo reads the shared dependency definitions from src/Cargo.toml. Individual sub-crates reference these centralized definitions using the workspace = true syntax rather than repeating version numbers.
For example, the workspace root defines the dependencies:
# src/Cargo.toml – workspace dependency definitions (lines 36-49)
[workspace.dependencies]
cef = { version = "=150.0.0", default-features = false }
gix = { version = "0.85", default-features = false, features = ["status", "sha1"] }
zbus = { version = "5", default-features = false, features = ["async-io", "blocking-api"] }
Sub-crates like src/mpv/ inherit these versions:
# src/mpv/Cargo.toml – referencing workspace dependencies
[dependencies]
serde_json = { workspace = true }
parking_lot = { workspace = true }
Key Dependency Configuration Files
The dependency structure spans multiple Cargo.toml files across the repository:
src/Cargo.toml: Workspace root defining all external crate versions in the[workspace.dependencies]table.src/mpv/Cargo.toml: MPV integration for video playback, inheriting workspace dependencies.src/jfn_cef/Cargo.toml: CEF bindings and browser host code.src/macos/Cargo.toml: macOS platform glue (Objective-C, windowing).src/wayland/Cargo.toml: Wayland-specific compositor code for Linux.src/mpris/Cargo.toml: MPRIS media session integration.
Summary
- Jellium-Desktop manages 14 external Rust crates through a centralized Cargo workspace configuration in
src/Cargo.toml. - The CEF crate (
=150.0.0) embeds the Jellyfin web interface, while zbus enables Linux MPRIS media controls. - Platform-specific stacks include windows, windows-core, and windows-sys for Windows, and objc2 with objc2-foundation for macOS.
- Workspace inheritance via
workspace = trueensures version consistency across internal crates likesrc/mpv/andsrc/macos/.
Frequently Asked Questions
Where are the dependencies for jellium-desktop defined?
All external dependencies for jellium-desktop are defined in the [workspace.dependencies] table of src/Cargo.toml (lines 36-49). This centralized location allows platform-specific sub-crates in src/macos/, src/wayland/, and other directories to reference the same dependency versions without duplication.
What is the CEF dependency used for in jellium-desktop?
The cef crate at version =150.0.0 provides the Chromium Embedded Framework, which jellium-desktop uses to render the Jellyfin web UI as an off-screen browser. This allows the application to display the web interface while maintaining a native Rust-based host application.
Does jellium-desktop use different dependencies on different platforms?
Yes. While core crates like serde_json and parking_lot are used across all platforms, specific target dependencies exist: the windows, windows-core, and windows-sys crates for Windows builds; objc2 and objc2-foundation for macOS; and zbus for Linux MPRIS integration.
How do I add a new dependency to the jellium-desktop workspace?
Add the crate and version to the [workspace.dependencies] section in src/Cargo.toml, then reference it in individual sub-crates using dependency_name = { workspace = true }. This pattern ensures all workspace members use identical versions of external libraries.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →