A cross-platform music player built with Rust, featuring a modern GUI, theme support, and persistent preferences.
- ๐จ 5 Built-in Themes - Dark, Light, Midnight, Ocean, Forest
- ๐ Persistent Preferences - Volume, theme, and last folder saved automatically
- ๐ Folder Scanning - Load entire music directories at once
- ๐ Live Search - Filter songs by title, artist, or album
- ๐ต Audio Formats - MP3, WAV, FLAC, OGG, M4A, AAC, WMA
- ๐ Shuffle & Repeat - Randomized playback and loop modes
- โฏ Full Controls - Play, pause, next, previous, seek, volume
- ๐ Progress Tracking - Draggable timeline with time display
- ๐ฑ๏ธ Double-click to Play - Quick playback from playlist
- ๐ Refresh Button - Rescan folder for new files
| Metric | Value |
|---|---|
| Binary Size | 21 MB (release, optimized) |
| Build Time | ~0.35s (incremental) |
| Source Lines | 1,598 LOC |
| Dependencies | 14 direct crates |
| Memory Usage | ~30-50 MB runtime |
- Rust 1.70+ (install Rust)
- Cargo (comes with Rust)
# Clone the repository
git clone https://github.com/praveensaummya/rustMusic.git
cd rustMusic
# Build release binary
cargo build --release
# Run the player
./target/release/rustmusiccurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/praveensaummya/rustMusic.git
cd rustMusic
cargo build --release
./target/release/rustmusic| Action | How |
|---|---|
| Open folder | Click ๐ Open Folder |
| Add files | Click โ Add Files |
| Play song | Double-click in playlist |
| Play/Pause | Click โถ/โธ button |
| Next/Prev | Click โญ/โฎ buttons |
| Seek | Drag progress slider |
| Volume | Drag volume slider |
| Search | Type in search bar |
| Refresh | Click ๐ Refresh (after opening folder) |
| Settings | Click โ๏ธ Settings |
Access settings via the โ๏ธ Settings button:
- Theme Selection - Choose from 5 color themes
- Default Volume - Set startup volume (0-100%)
- Last Session - View previously opened folder
- Save Preferences - Manually save or auto-saves on exit
| Key | Action |
|---|---|
| Space | Play/Pause |
| Left Arrow | Previous track |
| Right Arrow | Next track |
Preferences are stored in:
- Linux:
~/.config/rustmusic/config.toml - macOS:
~/Library/Application Support/rustmusic/config.toml - Windows:
%APPDATA%\rustmusic\config.toml
theme = "Dark"
volume = 0.8
last_folder = "/path/to/music"
window_width = 1000.0
window_height = 700.0src/
โโโ main.rs # Entry point (23 LOC)
โโโ audio.rs # Audio playback engine (310 LOC)
โโโ playlist.rs # Playlist management (167 LOC)
โโโ theme.rs # Theme definitions (206 LOC)
โโโ config.rs # Config persistence (71 LOC)
โโโ ui.rs # GUI rendering (821 LOC)
- GUI: egui + eframe - Immediate mode GUI
- Audio: rodio - Cross-platform audio playback
- Dialogs: rfd - Native file dialogs
- Config: serde + toml - Serialization
- Paths: dirs - Platform-specific directories
| Theme | Description |
|---|---|
| Dark | Classic dark theme (default) |
| Light | Clean light theme |
| Midnight | Deep blue-purple tones |
| Ocean | Blue-green aquatic theme |
| Forest | Green nature-inspired theme |
- MP3 (MPEG Audio)
- WAV (Waveform Audio)
- FLAC (Free Lossless Audio Codec)
- OGG (Vorbis/Opus)
- M4A (AAC in MP4 container)
- AAC (Advanced Audio Coding)
- WMA (Windows Media Audio)
cargo buildcargo build --releasecargo testcargo check
cargo clippy
cargo fmt -- --check- Ensure your system has audio output configured
- Check that the audio file format is supported
- Try running
pavucontrol(Linux) or equivalent to verify output
- Update Rust:
rustup update - Clean build:
cargo clean && cargo build --release - Check dependencies:
cargo update
- Ensure
~/.config/rustmusic/directory is writable - Check disk space
- Run with appropriate permissions
Contributions are welcome! Please feel free to submit issues and pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project uses GitHub Actions for automated cross-platform releases.
-
Update the version in
Cargo.toml:[package] version = "0.2.0" # Update this
-
Commit and push changes:
git add . git commit -m "Release v0.2.0" git push origin main
-
Create and push a git tag:
git tag v0.2.0 git push origin v0.2.0
-
GitHub Actions will automatically:
- Build binaries for Linux, macOS, and Windows
- Strip debug symbols for smaller binaries
- Create a GitHub Release with all binaries attached
Visit the Releases page to download:
rustmusic-linux-x64- Linux binaryrustmusic-macos-x64- macOS binaryrustmusic-windows-x64- Windows executable
No installation required - just download, make executable (Linux/macOS), and run!
If you prefer to build locally:
git clone https://github.com/praveensaummya/rustMusic.git
cd rustMusic
cargo build --release
# Binary location: target/release/rustmusic- Playlist save/load functionality
- Album art display
- Lyrics integration
- Equalizer
- Crossfade between tracks
- Last.fm/Spotify scrobbling
- Podcast support
- Internet radio streams
- System tray integration
- Global hotkeys
This project is licensed under the MIT License - see the LICENSE file for details.
Built with โค๏ธ using Rust
RustMusic Player - Fast, reliable, cross-platform music playback