Skip to content

Getting Started

Joseph Chacko edited this page Jul 22, 2026 · 2 revisions

Getting Started & Build Setup

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.

Prerequisites

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 rodio and zbus daemon/Cargo.toml:19-19, daemon/Cargo.toml:33-33.

Crate Structure & Build Order

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 Slint Compilation Step

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.

Building and Running

Automated Setup (run.sh)

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:

  1. Process Cleanup: Checks for /tmp/aurora-daemon.pid. If it exists, it kills the process ID stored in that file run.sh:3-6.
  2. Daemon Launch: Runs cargo rr -p aurora-daemon run.sh:8-8.
  3. Player Launch: Runs cargo rr -p aurora-player run.sh:9-9.

Manual Build

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-player

README.md:42-46

Build System Integration Diagram

The 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
Loading

Sources: README.md:12-18, README.md:50-52, app/build.rs:1-3, run.sh:3-6

Execution Architecture

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
Loading

Sources: run.sh:1-10, README.md:12-12, daemon/Cargo.toml:32-32

Technical Considerations

  • Stack Size (Windows compatibility note): Although the project is Linux-centric, the .cargo/config.toml in the app directory increases the stack size to 8000000 for 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:

Clone this wiki locally