Skip to content

Rockbox open source high quality audio player as a Music Player Daemon. This project brings modern enhancements to the classic Rockbox firmware, using Zig and Rust for improved performance and maintainability ⚑ πŸ¦€

License

Notifications You must be signed in to change notification settings

tsirysndr/rockbox-zig

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rockbox Zig 🎡 ⚑

GPL-2.0 licensed ci Docker Pulls GitHub Downloads (all assets, all releases) discord storybook

Rockbox UI

A modern take on the Rockbox open source high quality audio player with enhancements in Zig and Rust. This project offers:

  • gRPC & GraphQL APIs for seamless interaction and control
  • Chromecast support for streaming to your TV
  • MPD server for compatibility with existing clients
  • MPRIS support for desktop integration
  • TypeScript support for building powerful extensions

Take advantage of modern tooling while preserving the core functionality of Rockbox.

[!NOTE] 🐲 It is a work in progress and is not yet ready for use. πŸ—οΈπŸš§

Preview

✨ Features

  • Zig Build System
  • Rockbox API FFI for Rust
  • gRPC API
  • GraphQL API
  • HTTP API
  • Web Client (React)
  • Fast search engine, built with Tantivy
  • Desktop Client (Electron/Gtk)
  • Rockbox REPL
  • Terminal Client (TUI)
  • Systemd service
  • Gapless playback and crossfading
  • Navigate music by folders or tag database
  • Supports over 20 sound codecs: MP3, OGG, WAV, FLAC and many more
  • Android Library
  • Mobile version (React Native)
  • Stream from Youtube (audio only)
  • Stream from Spotify
  • Stream from Tidal
  • Stream to Chromecast
  • Stream to Kodi
  • TuneIn Radio
  • MPD Server
  • MPRIS
  • UPnP/DLNA
  • Airplay
  • TypeScript (Deno) API (for writing plugins)
  • Wasm extensions

πŸš€ Quickstart

To quickly get started, you can run the following docker command:

docker run \
    --device /dev/snd \
    --privileged \
    -p 6061:6061 \
    -p 6062:6062 \
    -p 6063:6063 \
    -p 6600:6600 \
    -v $HOME/Music:/root/Music \
    tsiry/rockbox:latest

🚚 Installation

Ubuntu/Debian

echo "deb [trusted=yes] https://apt.fury.io/tsiry/ /" | sudo tee /etc/apt/sources.list.d/fury.list
sudo apt-get update
sudo apt-get install rockbox

Fedora

Add the following to /etc/yum.repos.d/fury.repo:

[fury]
name=Gemfury Private Repo
baseurl=https://yum.fury.io/tsiry/
enabled=1
gpgcheck=0

Then run:

dnf install rockbox

Arch Linux

paru -S rockbox-zig-bin

Bash

curl -fsSL https://raw.githubusercontent.com/tsirysndr/rockbox-zig/HEAD/install.sh | bash

πŸ“¦ Downloads

πŸ§™β€β™‚οΈ Systemd Service

Rockbox daemon can be started as a systemd service. To enable and start the service, run the following command:

rockbox service install

To disable and stop the service, run the following command:

rockbox service uninstall

To check the status of the service, run the following command:

rockbox service status

Screenshot from 2025-01-18 18-57-39

Compiling from Source

Run the following commands to build the project:

Before building the project, you need to install the necessary dependencies for your operating system.

On Ubuntu/Debian

sudo apt-get install libusb-dev libsdl2-dev libfreetype6-dev libunwind-dev zip protobuf-compiler cmake

On Fedora40/41:

sudo dnf install libusb1-devel SDL2-devel freetype-devel libunwind-devel zip protobuf-compiler cmake
sudo ln -s /lib64/libusb-1.0.so /usr/lib64/libusb.so

Build Instructions

  1. Clone the repository
git clone https://github.com/tsirysndr/rockbox-zig.git
git submodule update --init --recursive
  1. Navigate to the project directory
cd rockbox-zig
  1. Build the webui
cd webui/rockbox
deno install
deno run build
  1. Run the following command to build the project
mkdir -p build && cd build
../tools/configure --target=sdlapp --type=N --lcdwidth=320 --lcdheight=240 --prefix=$HOME/.local
make zig

Build GUI (Gtk4)

sudo apt-get install flatpak
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install --user flathub org.flatpak.Builder
flatpak install --user flathub org.gnome.Sdk/x86_64/47
flatpak install --user flathub org.gnome.Platform/x86_64/47
flatpak install --user org.freedesktop.Sdk.Extension.rust-stable
flatpak install --user org.freedesktop.Sdk.Extension.llvm18
cd gtk
flatpak run org.flatpak.Builder --user --disable-rofiles-fuse --repo=repo flatpak_app build-aux/io.github.tsirysndr.Rockbox.json --force-clean
flatpak run org.flatpak.Builder --run flatpak_app build-aux/io.github.tsirysndr.Rockbox.json rockbox-gtk

πŸ§‘β€πŸ”¬ Architecture

architecture

πŸ“š GraphQL API

Open http://localhost:6062/graphiql in your browser.

πŸ“š HTTP API

Open http://localhost:6063 in your browser.

πŸ“š gRPC API

https://buf.build/tsiry/rockboxapis/docs/main:rockbox.v1alpha1

Try Rockbox gRPC API using Buf Studio.

About

Rockbox open source high quality audio player as a Music Player Daemon. This project brings modern enhancements to the classic Rockbox firmware, using Zig and Rust for improved performance and maintainability ⚑ πŸ¦€

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Languages

  • C 83.8%
  • C++ 6.7%
  • Rust 2.8%
  • Assembly 1.9%
  • TeX 1.4%
  • TypeScript 0.9%
  • Other 2.5%