Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
MoosicBox Native App
A cross-platform desktop music application built with the HyperChad framework, providing a native interface for the MoosicBox music server.
Overview
The MoosicBox Native App is a desktop client that provides:
- Cross-Platform Support: Windows, macOS, and Linux
- Multiple UI Backends: Egui (GPU-accelerated), FLTK (lightweight), Web (HTML/JS)
- Music Streaming: Connect to local or remote MoosicBox servers
- Multi-Source Support: Local library, Tidal, Qobuz, YouTube Music
- High-Quality Audio: Support for FLAC, AAC, MP3, Opus formats
- Modern Interface: Responsive design with native look and feel
- Download Support: Download music for offline playback
Installation
From Source
Pre-built Binaries
Download from the releases page or build locally.
System Dependencies
Linux
# Ubuntu/Debian
# For audio support
# For Egui backend
macOS
# Using Homebrew
# For audio support
Windows
- Visual Studio Build Tools or Visual Studio Community
- Windows SDK
Usage
Basic Usage
Start the native app:
Or using cargo:
Library Integration API
If you embed this crate in another Rust application, the primary public entry points are:
moosicbox_app_native::init()- Initializes and returns the application router with all routes registeredmoosicbox_app_native::init_app_state(state).await- Initializes app state persistence and event listenersmoosicbox_app_native::actions::handle_action(action, value).await- Dispatches UI actions (playback, queue, search, filtering)- Global statics:
ROUTER,RENDERER,STATE_LOCK,STATE, andPROFILE
Connection Configuration
Server connections are configured through the in-app settings interface:
- Navigate to Settings → Connections
- Add a new connection with your server URL
- Select the connection to use
UI Backend Selection
The default build includes multiple UI backends. You can enable specific backends with cargo features:
Egui (GPU Accelerated - Default)
Additional Egui variants:
egui-glow- OpenGL backendegui-v1- Legacy HyperChad egui renderer implementation (original, overcomplicated)egui-v2- New HyperChad egui renderer implementation (work in progress, simplified)
FLTK (Lightweight)
Web Interface (HTML + JavaScript)
The web interface supports additional deployment options:
actix- Deploy with Actix web serverlambda- Deploy as AWS Lambda function
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
WINDOW_WIDTH |
Initial window width | 1000.0 |
WINDOW_HEIGHT |
Initial window height | 600.0 |
WINDOW_X |
Initial window X position | - |
WINDOW_Y |
Initial window Y position | - |
MAX_THREADS |
Maximum blocking threads | 64 |
TOKIO_CONSOLE |
Enable tokio console (requires console-subscriber feature) |
- |
RUST_LOG |
Logging configuration | - |
Note: Server connection settings are configured through the in-app settings interface rather than environment variables.
Features
Audio Formats Support
- FLAC - Lossless audio with full quality
- AAC/M4A - High-quality lossy compression
- MP3 - Universal compatibility
- Opus - Modern, efficient codec
Music Sources
- Local Library - Your personal music collection
- Tidal - Hi-Fi streaming service
- Qobuz - Hi-Res audio streaming
- YouTube Music - Google's music service
Playback Features
- Audio Visualization - Real-time waveform display
- Volume Control - Adjust playback volume
- Seek Control - Navigate within tracks
- Queue Management - Control playback order
Planned Features
- Gapless playback
- Crossfade transitions
- Replay Gain normalization
- Equalizer controls
- Lyrics display
Interface Features
- Library Browser - Navigate your music collection
- Albums View - Browse and filter albums by source
- Artist View - View artist details and albums
- Audio Zones - Manage playback zones
- Playback Sessions - View and control active sessions
- Settings - Configure connections, downloads, and music API sources
- Download Manager - Offline music management
Building
Development Build
# Debug build with all features
# Specific UI backend
Release Build
# Optimized release build
# Minimal build for distribution
Cross-Platform Builds
# Build for Windows from Linux
# Build for macOS from Linux (requires cross-compilation setup)
# Build AppImage for Linux
Bundled Mode
For self-contained deployment with embedded server:
# Build with bundled server
# This creates a single executable with embedded MoosicBox server
Bundled Mode Features
- Standalone Operation - Embedded server runs in the same process
- Auto-Configuration - Automatic server startup and initialization
- Performance - Direct in-process communication with the server
Development
Local Development
# Start with debug features
Note: The dev feature enables asset serving and static route handling for development.
Testing Different Backends
# Test Egui backend
# Test FLTK backend
# Test web backend
Performance Profiling
# Profile with puffin
# Profile with tracing
# Profile with Tracy
Packaging
Windows Installer
# Build MSI installer
# Build NSIS installer (requires NSIS)
macOS Bundle
# Create .app bundle
# Create DMG
Linux Packages
# Create AppImage
# Create Debian package
# Create RPM package (requires rpm tools)
User Interface
Main Interface Components
The user interface is built using the HyperChad framework and includes:
- Home View - Main dashboard with library access
- Albums View - Browse and filter albums by source
- Artists View - View artist details and albums
- Player Controls - Play, pause, skip, seek, volume control
- Audio Visualization - Real-time waveform display
- Settings - Configure connections, downloads, music API sources, and scan settings
- Audio Zones & Sessions - Manage playback zones and sessions
The interface and keyboard shortcuts are currently determined by the UI backend being used (Egui, FLTK, or Web). Note: Standardized keybindings across all UI backends is a planned future enhancement.
Troubleshooting
Common Issues
- Connection failed: Check server URL and network connectivity
- Audio playback issues: Verify audio drivers and output device
- High CPU usage: Try different UI backend or disable visualizations
- Crashes: Check system dependencies and graphics drivers
Debug Information
# Enable detailed logging
RUST_LOG=moosicbox_app_native=debug
# Audio debugging
RUST_LOG=moosicbox_audio=debug
# Network debugging
RUST_LOG=moosicbox_http=debug
Performance Issues
# Disable GPU acceleration if issues occur
# Use lightweight FLTK backend
Architecture
The MoosicBox Native App is structured as follows:
- Main Application (
moosicbox_app_native) - Application entry point and routing - UI Components (
moosicbox_app_native_ui) - HyperChad-based UI components - Bundled Server (
moosicbox_app_native_bundled) - Optional embedded server mode - App State (
moosicbox_app_state) - Application state management - Player (
moosicbox_player) - Audio playback functionality - Music API (
moosicbox_music_api) - Multi-source music integration
See Also
- MoosicBox App Native UI - UI component library
- MoosicBox App Native Bundled - Bundled server mode