
Spotifust
A multi-platform, ultra-lightweight Spotify client built entirely from scratch in Rust. Ditching the heavy browser engines for pure native playback.
The Story Behind Spotifust
Spotifust started from a simple but stubborn idea: why does a music player need to load an entire web browser inside it?
Modern desktop apps often rely on heavy web engines like Electron or Chromium, which eat up RAM and battery. Our purpose is to build an application that does one thing perfectly—playing music—while maintaining a baseline memory footprint of less than 25 MB.
No Node.js running behind the scenes, no full Chromium instance rendering four buttons. Just one binary, one process, and your GPU doing what it does best. That's the core philosophy.
RAM Footprint Comparison
* The final optimization goal is to maintain a baseline footprint of ≤ 25 MB.
** Measurements based on the native Windows application.
Powered by Rust
Spotifust relies on the Rust ecosystem's best crates to deliver a smooth and safe native experience.
🎨 iced & tiny-skia
For a GPU-accelerated GUI based on the Elm Architecture (MVU). Clean state management without mutability nightmares.
🎵 librespot
An embedded engine for session management, DRM decryption, and chunk fetching straight from Spotify's servers.
🔊 rodio
Handles cross-platform audio output to feed decoded PCM arrays directly to the system sound drivers.
🌐 rspotify & tokio
Asynchronous multi-threading for the Spotify Web API and network requests, avoiding UI thread blocking.
📊 Language Distribution
Architecture & Roadmap
We follow a strict zero-crashing policy and an Elm-like pure Model-View-Update flow. Here is where the project is heading.
Phase 1: Bootstrapping & Core Architecture
- Configure Cargo.toml with feature flags for Iced (tiny-skia backend to save RAM), RSpotify, and Librespot
- Define central
AppErrorenum (thiserror) with per-subsystem variants - Set up base Model-View-Update loop in
src/app.rs - Set up full GitHub Actions CI/CD infrastructure, Issue templates, and documentation
Phase 2: Custom Canvas Layout Engine
- Implement bounding-box tracking struct for responsive cards
- Handle PointerPressed / Moved / Released inside
canvas::Program::update - Wire
canvas::Cacheinvalidation to interaction messages only - Wire synthetic audio engine test pipeline (
rodiobackend)
Phase 3: Librespot Audio & Session Pipeline (Next up)
- **Librespot Authentication**: Setup
librespot::core::session::Sessionand login using credentials or Zeroconf. - **Librespot Audio Backend**: Implement a custom
librespot::playback::audio_backend::Sinkthat captures decoded PCM frames from Spotify. - **Audio Bridge**: Route the decoded PCM frames from the Librespot custom Sink through our bounded
mpscchannel directly to ourrodioplayback thread. - **Playback Control**: Wire UI commands (Play, Pause, Skip, Seek) through
iced::Subscriptiondown to thelibrespotplayer instance. - **Track Metadata**: Extract current track information (Title, Artist, Duration, Position) from Librespot events and stream them to the UI state.
Phase 4: RSpotify Web API, Auth & Premium UI
- **OAuth PKCE Flow**: Implement
rspotifyAuthorization Code Flow with PKCE using a custom protocol callback (spotifust://callback). - **Keychain Storage**: Securely store the OAuth refresh token via the OS credential store (
keyringcrate). - **Main Layout UI**: Build the primary layout grid using standard
icedwidgets (Sidebar, Main Content Area, Bottom Playback Bar). - **Playback Bar UI**: Implement a dynamic Bottom Playback Bar with Album Art, Title, Artist, Play/Pause/Skip buttons, and a draggable Seek Bar.
- **Library & Search UI**: Fetch and display the user's saved playlists, albums, and top tracks using the RSpotify client.
- **Album Art Caching**: Fetch album cover images asynchronously and cache them to disk in
src/api/cache.rsto avoid redundant network calls.
Phase 5: Polish & Optimization
- **Memory Profiling**: Verify the application stays under the strict 25MB RAM baseline.
- **Micro-animations**: Add smooth hover transitions and interactions to UI elements.
- **System Tray Integration**: Add a system tray icon with basic playback controls (if supported by OS).
- Reducir aún más el consumo de RAM (actualmente en ~45MB) para alcanzar el límite estricto de < 25MB establecido en AGENTS.md.
- Ensure all
librespotandrspotifyerrors are properly wrapped inAppErrorvariants before reaching theiced::Messageenum. - (None currently - waiting for tomorrow's session)
Project Metrics
Daily Commits (Last 28 days) (Last 7 days)
Get Involved
If you love systems programming in Rust, software architecture, or simply enjoy crafting highly performant tools, the door is open for your contributions.
Built with passion and code by GenaDeev. Any PR that respects our philosophy is more than welcome.
Read Contributing Guide