How zadotme/riff-rust works
Riff is a native music player combining a Slint interface with a Rust playback and service backend. The main workflow is user discovery or library selection, track resolution/streaming, decoding and audio processing, then playback state and visual feedback. The backend also supports local-library scanning, persistent track data, lyrics, artist/search discovery, recommendations, image proxying, and updates. The README documents the product boundary; source excerpts show backend routing and several service calls, but not the UI-to-backend wiring, so that link is left unverified.
Main entry points: api.rs HTTP API · mod.rs Playback controller · lib.rs Backend runtime · library.rs Local library scan
Components 22
Player interface
- Slint player UI
rust/riff-slint/src/lib.rs
Backend services
- HTTP API
rust/riff-core/src/api.rs - Backend runtime
rust/riff-core/src/lib.rs - Configuration
rust/riff-core/src/config.rs - Image proxy
rust/riff-core/src/image_proxy.rs - External tools
rust/riff-core/src/tools.rs - Updater
rust/riff-core/src/updater.rs
Discovery and sources
- YouTube services
rust/riff-core/src/youtube.rs - SoundCloud services
rust/riff-core/src/soundcloud.rs - Lyrics providers
rust/riff-core/src/lyrics.rs - Audio streaming
rust/riff-core/src/stream.rs
Playback engine
- Playback controller
rust/riff-core/src/player/mod.rs - Audio decoder
rust/riff-core/src/player/decoder.rs - DSP and visualizer
rust/riff-core/src/player/dsp.rs - Audio output
rust/riff-core/src/player/sink.rs
Library and state
- Local library scan
rust/riff-core/src/library.rs - SQLite persistence
rust/riff-core/src/db.rs - Domain models
rust/riff-core/src/models.rs - Playback events
rust/riff-core/src/events.rs
Other components
- Listener
- Music services
- Local audio files
Connections 26
- Listener → Slint player UI: operates
README.md - Slint player UI → HTTP API: uses backend
- Backend runtime → HTTP API: routes requests
rust/riff-core/src/lib.rs - HTTP API → YouTube services: searches and resolves
rust/riff-core/src/api.rs - HTTP API → SoundCloud services: searches
rust/riff-core/src/api.rs - HTTP API → Lyrics providers: fetches lyrics
rust/riff-core/src/lib.rs - HTTP API → Local library scan: scans library
rust/riff-core/src/lib.rs - HTTP API → SQLite persistence: reads and writes
rust/riff-core/src/api.rs - HTTP API → Audio streaming: serves audio
rust/riff-core/src/lib.rs - HTTP API → Image proxy: proxies images
rust/riff-core/src/lib.rs - HTTP API → Playback controller: controls playback
rust/riff-core/src/api.rs - YouTube services → Music services: requests media
rust/riff-core/src/youtube.rs - SoundCloud services → Music services: requests media
rust/riff-core/src/soundcloud.rs - Lyrics providers → Music services: queries providers
rust/riff-core/src/lyrics.rs - Audio streaming → Music services: proxies audio
rust/riff-core/src/stream.rs - Local library scan → Local audio files: scans files
rust/riff-core/src/library.rs - Local library scan → SQLite persistence: upserts tracks
rust/riff-core/src/library.rs - Playback controller → Audio decoder: decodes audio
rust/riff-core/src/player/mod.rs - Playback controller → DSP and visualizer: processes samples
rust/riff-core/src/player/mod.rs - Playback controller → Audio output: outputs audio
rust/riff-core/src/player/mod.rs - Playback controller → Playback events: emits playback state
rust/riff-core/src/player/mod.rs - SQLite persistence → Domain models: stores tracks
rust/riff-core/src/db.rs - Playback events → Domain models: carries tracks
rust/riff-core/src/events.rs - Backend runtime → Configuration: loads settings
rust/riff-core/src/lib.rs - Backend runtime → External tools: uses utilities
rust/riff-core/src/lib.rs - Backend runtime → Updater: checks updates
rust/riff-core/src/lib.rs