-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Relevant source files
The following files were used as context for generating this wiki page:
This page provides a technical guide for setting up the development environment, building the Aurora components, and executing the system. Aurora is a Linux-focused music player utilizing a daemon/client architecture, built with Rust and the Slint UI framework.
Before building Aurora, ensure the following environmental requirements are met:
- Operating System: Linux is required due to the reliance on Unix domain sockets for IPC and D-Bus for MPRIS2 support README.md:52-52.
- Rust Toolchain: Rust edition 2024 is required README.md:50-50.
-
Fonts: The UI specifically requires JetBrainsMono NFP (Nerd Font) for rendering icons and UI elements README.md:51-51. This font is bundled within the repository at
app/assets/README.md:51-51. -
System Libraries: Development headers for ALSA (for audio output) and D-Bus (for MPRIS) are typically required by the underlying Rust crates like
rodioandzbusdaemon/Cargo.toml:19-19, daemon/Cargo.toml:33-33.
Aurora is organized as a Cargo workspace with three primary crates. While cargo build at the root will compile all components, understanding the dependencies is crucial for development.
| Crate Name | Role | Key Dependencies |
|---|---|---|
aurora-protocol |
Shared IPC types and serialization logic. |
serde, uuid
|
aurora-daemon |
Background service for playback and library management. |
rodio, symphonia, rusqlite, aurora-protocol
|
aurora-player |
Slint-based GUI frontend. |
slint, tokio, aurora-protocol
|
The aurora-player (referred to as app in the file tree) contains a build.rs script. This script is executed by Cargo before the crate itself is compiled.
-
Function:
slint_build::compile("ui/AuroraPlayer.slint")app/build.rs:2-2. - Purpose: It compiles the Slint markup language into highly optimized Rust code that is then included in the binary. If this step fails, the GUI cannot be built.
The project provides a run.sh script to streamline the development lifecycle. This script handles the termination of existing instances and restarts both components run.sh:1-10.
Execution Flow of run.sh:
-
Process Cleanup: Checks for
/tmp/aurora-daemon.pid. If it exists, it kills the process ID stored in that file run.sh:3-6. -
Daemon Launch: Runs
cargo rr -p aurora-daemonrun.sh:8-8. -
Player Launch: Runs
cargo rr -p aurora-playerrun.sh:9-9.
For production or release testing, use the standard Cargo commands:
# Build all crates in release mode
cargo build --release
# Run the daemon (background service)
cargo run --release -p aurora-daemon
# Run the GUI (frontend)
cargo run --release -p aurora-playerThe following diagram illustrates how the build artifacts and external requirements converge to produce the running Aurora system.
Build Pipeline and Artifact Generation
graph TD
subgraph "External Requirements"
A["Rust Edition 2024"]
B["JetBrainsMono NFP"]
C["Linux Kernel (Unix Sockets)"]
end
subgraph "Build Process"
D["aurora-protocol"] --> E["aurora-daemon"]
D --> F["aurora-player"]
G["ui/AuroraPlayer.slint"] -- "slint_build::compile()" --> H["app/build.rs"]
H --> F
end
subgraph "Runtime Entities"
E -- "Write PID" --> I["/tmp/aurora-daemon.pid"]
E -- "Listen" --> J["Unix Socket"]
F -- "Connect" --> J
end
A & B & C --> D
Sources: README.md:12-18, README.md:50-52, app/build.rs:1-3, run.sh:3-6
When run.sh is executed, it manages the lifecycle of two distinct binaries that communicate over a local socket.
System Startup and IPC Linking
sequenceDiagram
participant Shell as "run.sh"
participant Daemon as "aurora-daemon"
participant Player as "aurora-player"
participant FS as "Filesystem (/tmp/)"
Shell->>FS: Read /tmp/aurora-daemon.pid
Note over Shell,FS: Kill existing daemon if PID exists
Shell->>Daemon: cargo run -p aurora-daemon
activate Daemon
Daemon->>FS: Create aurora-daemon.pid
Daemon->>FS: Open Unix Socket
deactivate Daemon
Shell->>Player: cargo run -p aurora-player
activate Player
Player->>FS: Connect to Unix Socket
Player->>Daemon: Request initial Status
Daemon-->>Player: Response (Theme, Volume, Queue)
deactivate Player
Sources: run.sh:1-10, README.md:12-12, daemon/Cargo.toml:32-32
-
Stack Size (Windows compatibility note): Although the project is Linux-centric, the
.cargo/config.tomlin theappdirectory increases the stack size to8000000for MSVC targets to prevent overflows during debug builds of the Slint UI app/.cargo/config.toml:1-12. -
Asset Bundling: Album art placeholders and fonts are bundled using Rust's
include_bytes!or Slint's asset embedding, ensuring the binary is portable regarding its internal UI assets README.md:51-51, app/assets/placeholder.png:1-9.
Sources:
Overview
aurora-daemon
- Background Service
- Startup & State Init
- Request Handlers & Dispatch
- Playback Engine & Audio
- Library Indexing & Watching
- Playlists, Liked & History
- Background Threads
aurora-protocol
aurora-player
Reference