-
Notifications
You must be signed in to change notification settings - Fork 1
Architecture
ecamacho edited this page Jul 10, 2026
·
2 revisions
Jellyx is a Cargo workspace. Rust is the source of truth; the Svelte UI is a thin client. Audio is owned by the Rust side and survives UI reloads.
| Crate / dir | Role |
|---|---|
jellyx-core |
Pure domain logic. No Tauri dependency. |
jellyx-desktop |
Tauri app: audio, IPC, persistence, sources, updater |
jellyx-cli |
CLI skeleton |
jellyx-ffi |
FFI skeleton |
ui/ |
Svelte frontend (dumb client) |
- Rust is the source of truth. State, audio, persistence live in Rust.
- Svelte is a dumb client. It renders state and sends commands; it does not own audio.
- Audio survives UI reload. Reloading the frontend does not stop playback, because the audio pipeline runs in the Rust process.
Source (YouTube / SoundCloud / local)
-> Symphonia decoder
-> PCM bus
-> cpal output (audio to speakers)
-> rustfft FFT (frequency data)
-> binary IPC event (FFT to Svelte visualizer)
- Symphonia decodes audio to PCM.
- PCM bus feeds both output and analysis.
- cpal sends audio to the device.
- rustfft computes frequency bins for visualizers.
- FFT events are sent as binary (not JSON) for throughput.
Two channels between Rust and Svelte:
| Channel | Payload | Use |
|---|---|---|
| Commands (UI → Rust) | JSON | Play, pause, enqueue, manage library, settings |
| Events (Rust → UI) | JSON | State changes, track info, errors |
| FFT events (Rust → UI) | Binary | Live visualizer data |
Because IPC is JSON for control and binary for FFT, the UI stays simple while visualizers stay performant.
- SQLite via rusqlite.
- Stores queue, playlists, favorites, history, settings.
- Lives in the desktop app's data directory.
Implemented in jellyx-desktop. Each source is a module that produces PCM into the bus. Sources can be toggled in Settings.
jellyx-desktop includes an updater module (Tauri-managed). See Release Process for how releases are produced and Platform Support for per-platform packaging.
- Building from Source — compile the workspace
- UI Design — what the Svelte side renders
- Packaging Guide — how crates map to packages