···13131414
15151616-A modern take on the [Rockbox](https://www.rockbox.org) open source high quality
1717-audio player with enhancements in Zig and Rust. This project offers:
1818-1919-- gRPC & GraphQL APIs for seamless interaction and control
2020-- Chromecast support for streaming to your TV
2121-- [MPD](https://mpd.readthedocs.io/en/stable/protocol.html) server for
2222- compatibility with existing clients
2323-- [MPRIS](https://specifications.freedesktop.org/mpris-spec/) support for
2424- desktop integration
2525-- TypeScript support for building powerful extensions
2626-2727-Take advantage of modern tooling while preserving the core functionality of
2828-Rockbox.
2929-3030-> [!NOTE] **๐ฒ It is a work in progress and is not yet ready for use. ๐๏ธ๐ง**
1616+A modern take on the [Rockbox](https://www.rockbox.org) open source audio
1717+player, extended with Rust and Zig. Rockbox Zig exposes the full Rockbox audio
1818+engine โ gapless playback, DSP, 20+ codecs, tag database โ through gRPC,
1919+GraphQL, HTTP, and MPD APIs, and adds multi-room output via AirPlay, Snapcast,
2020+and Squeezelite.
31213222
3323
3434-
3535-
2424+
2525+
36262727+---
37283829## โจ Features
39304040-- [x] Zig Build System
4141-- [x] Rockbox API FFI for Rust
3131+### Audio output
3232+- [x] Built-in SDL audio
3333+- [x] AirPlay (RAOP) โ stream to Apple TV, HomePod, Airport Express, shairport-sync
3434+- [x] Snapcast (FIFO/pipe) โ synchronised multi-room via snapserver
3535+- [x] Squeezelite (Slim Protocol + HTTP broadcast) โ synchronised multi-room
3636+- [x] Chromecast
3737+- [x] Gapless playback and crossfading
3838+- [x] Supports 20+ codecs: MP3, OGG, FLAC, WAV, AAC, Opus, and more
3939+4040+### APIs & integrations
4241- [x] [gRPC API](https://buf.build/tsiry/rockboxapis/docs/main:rockbox.v1alpha1)
4342- [x] GraphQL API
4444-- [x] HTTP API
4545-- [x] Web Client (React)
4646-- [x] Fast search engine, built with
4747- [Typesense](https://typesense.org)
4848-- [x] Desktop Client (Electron/Gtk)
4343+- [x] HTTP REST API
4444+- [x] [MPD](https://mpd.readthedocs.io/en/stable/protocol.html) server โ compatible with all MPD clients
4545+- [x] [MPRIS](https://specifications.freedesktop.org/mpris-spec/) โ desktop media key and taskbar integration
4646+- [x] Fast search powered by [Typesense](https://typesense.org)
4747+- [x] Navigate by folders or tag database
4848+4949+### Clients
5050+- [x] Web client (React)
5151+- [x] Desktop client (Electron / GTK4)
5252+- [x] Terminal client (TUI)
4953- [x] Rockbox REPL
5050-- [x] Terminal Client (TUI)
5151-- [x] Systemd service
5252-- [x] Gapless playback and crossfading
5353-- [x] Navigate music by folders or tag database
5454-- [x] Supports over 20 sound codecs: MP3, OGG, WAV, FLAC and many more
5555-- [ ] Android Library
5656-- [ ] Mobile version (React Native)
5757-- [ ] Stream from Youtube (audio only)
5858-- [ ] Stream from Spotify
5959-- [ ] Stream from Tidal
6060-- [x] Stream to Chromecast
6161-- [ ] Stream to Kodi
5454+5555+### Planned
5656+- [ ] Android library
5757+- [ ] Mobile app (React Native)
5858+- [ ] Stream from YouTube / Spotify / Tidal
6259- [ ] TuneIn Radio
6363-- [x] MPD Server
6464-- [x] MPRIS
6560- [ ] UPnP/DLNA
6666-- [x] Airplay
6767-- [x] Snapcast
6868-- [x] Slim Protocol
6969-- [ ] TypeScript ([Deno](https://deno.com)) API (for writing plugins)
6161+- [ ] Kodi output
6262+- [ ] TypeScript ([Deno](https://deno.com)) plugin API
7063- [ ] Wasm extensions
71646565+---
6666+6767+## ๐ Quick Start
6868+6969+1. **Install** (see [Installation](#-installation) below).
7070+7171+2. **Create `~/.config/rockbox.org/settings.toml`**:
7272+7373+```toml
7474+music_dir = "/path/to/your/Music"
7575+audio_output = "builtin" # SDL audio โ see Audio Output for other options
7676+```
7777+7878+3. **Run the daemon**:
7979+8080+```sh
8181+rockboxd
8282+```
8383+8484+4. **Open the web UI** at [http://localhost:6062/graphiql](http://localhost:6062) or connect any MPD client to `localhost:6600`.
8585+8686+---
8787+8888+## ๐ Ports
8989+9090+| Service | Default port | Protocol |
9191+|---|---|---|
9292+| gRPC | 6061 | gRPC / gRPC-Web |
9393+| GraphQL + Web UI | 6062 | HTTP |
9494+| HTTP REST API | 6063 | HTTP |
9595+| MPD server | 6600 | MPD protocol |
9696+| Slim Protocol (squeezelite) | 3483 | TCP |
9797+| HTTP PCM stream (squeezelite) | 9999 | HTTP |
9898+9999+---
100100+101101+## โ๏ธ Audio Output Configuration
102102+103103+Rockbox reads `~/.config/rockbox.org/settings.toml` at startup.
104104+`music_dir` is always required. `audio_output` defaults to `"builtin"` if
105105+omitted.
106106+107107+### Built-in SDL โ default
108108+109109+```toml
110110+music_dir = "/path/to/Music"
111111+audio_output = "builtin"
112112+```
113113+114114+Uses SDL2 audio โ plays through the OS default device. No extra setup needed.
115115+116116+### Snapcast (FIFO / pipe)
117117+118118+```toml
119119+music_dir = "/path/to/Music"
120120+audio_output = "fifo"
121121+fifo_path = "/tmp/snapfifo" # named FIFO for snapserver; use "-" for stdout
122122+```
123123+124124+Writes raw **S16LE stereo 44100 Hz** PCM to a named FIFO. Feed it into
125125+[Snapcast](https://github.com/badaix/snapcast) for synchronised multi-room
126126+playback:
127127+128128+```ini
129129+# /etc/snapserver.conf (or /usr/local/etc/snapserver.conf on macOS)
130130+[stream]
131131+source = pipe:///tmp/snapfifo?name=default&sampleformat=44100:16:2
132132+```
133133+134134+> **Startup order**: start `rockboxd` before `snapserver`. Rockbox holds a
135135+> permanent write reference on the FIFO so snapserver never sees a premature
136136+> EOF between tracks.
137137+138138+Pipe to any PCM consumer with `fifo_path = "-"`:
139139+140140+```sh
141141+rockboxd | ffplay -f s16le -ar 44100 -ac 2 -
142142+```
143143+144144+### AirPlay (RAOP)
145145+146146+```toml
147147+music_dir = "/path/to/Music"
148148+audio_output = "airplay"
149149+airplay_host = "192.168.1.50" # IP of the AirPlay receiver
150150+airplay_port = 5000 # optional, default 5000
151151+```
152152+153153+Streams ALAC-encoded audio over RTP to any RAOP-compatible receiver โ Apple
154154+TV, HomePod, Airport Express, or
155155+[shairport-sync](https://github.com/mikebrady/shairport-sync).
156156+157157+### Squeezelite (Slim Protocol โ multi-room)
158158+159159+```toml
160160+music_dir = "/path/to/Music"
161161+audio_output = "squeezelite"
162162+squeezelite_port = 3483 # Slim Protocol TCP port, default 3483
163163+squeezelite_http_port = 9999 # HTTP PCM broadcast port, default 9999
164164+```
165165+166166+Rockbox acts as a minimal Logitech Media Server. Any number of
167167+[squeezelite](https://github.com/ralph-irving/squeezelite) clients can connect
168168+simultaneously; Rockbox sends a `sync` packet to every client once per second
169169+so they all align to the same playback clock:
170170+171171+```sh
172172+squeezelite -s localhost -n "Living Room"
173173+squeezelite -s localhost -n "Kitchen"
174174+squeezelite -s localhost -n "Bedroom"
175175+```
176176+177177+Select a specific output device:
178178+179179+```sh
180180+squeezelite -s localhost -l # list available devices
181181+squeezelite -s localhost -o "" # system default
182182+squeezelite -s localhost -o "Built-in Output"
183183+```
184184+185185+---
186186+72187## ๐ Installation
731887474-### Ubuntu/Debian
189189+### Ubuntu / Debian
7519076191```sh
77192echo "deb [trusted=yes] https://apt.fury.io/tsiry/ /" | sudo tee /etc/apt/sources.list.d/fury.list
···8319884199Add the following to `/etc/yum.repos.d/fury.repo`:
852008686-```
201201+```ini
87202[fury]
88203name=Gemfury Private Repo
89204baseurl=https://yum.fury.io/tsiry/
···103218paru -S rockbox-zig-bin
104219```
105220106106-### Bash / Linux / MacOS
221221+### Universal (curl installer)
107222108223```sh
109224curl -fsSL https://raw.githubusercontent.com/tsirysndr/rockbox-zig/HEAD/install.sh | bash
110225```
111226227227+---
228228+112229## ๐ฆ Downloads
113230114114-- `Linux`: intel:
115115- [rockbox_2026.04.20_x86_64-linux.tar.gz](https://github.com/tsirysndr/rockbox-zig/releases/download/2026.04.20/rockbox_2026.04.20_x86_64-linux.tar.gz)
116116- arm64:
117117- [rockbox_2026.04.20_aarch64-linux.tar.gz](https://github.com/tsirysndr/rockbox-zig/releases/download/2026.04.20/rockbox_2026.04.20_aarch64-linux.tar.gz)
118118-- `macOS`: intel:
119119- [rockbox-2026.04.20-x86_64.pkg](https://github.com/tsirysndr/rockbox-zig/releases/download/2026.04.20/rockbox-2026.04.20-x86_64.pkg)
120120- arm64:
121121- [rockbox-2026.04.20-aarch64.pkg](https://github.com/tsirysndr/rockbox-zig/releases/download/2026.04.20/rockbox-2026.04.20-aarch64.pkg)
231231+Pre-built binaries for the latest release are available on the
232232+[Releases page](https://github.com/tsirysndr/rockbox-zig/releases/latest).
122233123123-## ๐งโโ๏ธ Systemd Service
234234+| Platform | Architecture | Package |
235235+|----------|-------------------------|-----------|
236236+| Linux | x86_64 | `.tar.gz` |
237237+| Linux | aarch64 | `.tar.gz` |
238238+| macOS | x86_64 | `.pkg` |
239239+| macOS | aarch64 (Apple Silicon) | `.pkg` |
124240125125-Rockbox daemon can be started as a systemd service. To enable and start the
126126-service, run the following command:
241241+---
127242128128-```sh
129129-rockbox service install
130130-```
131131-132132-To disable and stop the service, run the following command:
133133-134134-```sh
135135-rockbox service uninstall
136136-```
137137-138138-To check the status of the service, run the following command:
243243+## ๐งโโ๏ธ Systemd Service
139244140245```sh
141141-rockbox service status
246246+rockbox service install # enable and start
247247+rockbox service uninstall # stop and disable
248248+rockbox service status # check status
142249```
143250144144-
251251+
145252146146-## Compiling from Source
253253+---
147254148148-Run the following commands to build the project:
255255+## ๐๏ธ Compiling from Source
149256150150-Before building the project, you need to install the necessary dependencies for
151151-your operating system.
257257+### Dependencies
152258153153-### On Ubuntu/Debian
259259+**Ubuntu / Debian**
154260155155-```bash
261261+```sh
156262sudo apt-get install libsdl2-dev libfreetype6-dev libunwind-dev zip protobuf-compiler cmake
157263```
158264159159-### On Fedora40/41:
265265+**Fedora**
160266161267```sh
162268sudo dnf install SDL2-devel freetype-devel libunwind-devel zip protobuf-compiler cmake
163269```
164270165165-### Build Instructions
166166-167167-1. Clone the repository
271271+**macOS**
168272169273```sh
170170-git clone https://github.com/tsirysndr/rockbox-zig.git
171171-git submodule update --init --recursive
274274+brew install sdl2 freetype cmake protobuf
172275```
173276174174-2. Navigate to the project directory
277277+You also need [Zig](https://ziglang.org/download/) โฅ 0.13 and a recent stable
278278+Rust toolchain (`rustup update stable`).
279279+280280+### Build
175281176282```sh
283283+# 1. Clone
284284+git clone https://github.com/tsirysndr/rockbox-zig.git
177285cd rockbox-zig
178178-```
286286+git submodule update --init --recursive
179287180180-3. Build the webui
181181-182182-```sh
288288+# 2. Build the web UI
183289cd webui/rockbox
184290deno install
185291deno run build
292292+cd ../..
293293+294294+# 3. Configure and build the C firmware (one-time setup)
295295+mkdir -p build-lib && cd build-lib
296296+../tools/configure --target=sdlapp --type=N --lcdwidth=320 --lcdheight=240 --prefix=/usr/local
297297+cp ../autoconf/autoconf.h .
298298+make lib
299299+cd ..
300300+301301+# 4. Build Rust crates
302302+cargo build --release -p rockbox-cli -p rockbox-server
303303+304304+# 5. Link everything with Zig
305305+cd zig && zig build
186306```
187307188188-4. Run the following command to build the project
308308+The binary is at `zig/zig-out/bin/rockboxd`.
189309190190-```sh
191191-mkdir -p build-lib && cd build-lib
192192-../tools/configure --target=sdlapp --type=N --lcdwidth=320 --lcdheight=240 --prefix=/usr/local && cp ../autoconf/autoconf.h .
193193-make zig
194194-```
310310+> **Rebuilding after changes**: after editing C code run `make lib` in
311311+> `build-lib`; after editing Rust run `cargo build --release`. Then re-run
312312+> `zig build`. Zig only re-links when the `.a` files are newer than the binary.
195313196196-### Build GUI (Gtk4)
314314+### Build the GTK4 desktop app
197315198316```sh
199317sudo apt-get install flatpak
···208326flatpak run org.flatpak.Builder --run flatpak_app build-aux/io.github.tsirysndr.Rockbox.json rockbox-gtk
209327```
210328329329+---
330330+211331## ๐งโ๐ฌ Architecture
212332213213-
333333+
334334+335335+The Rockbox C firmware (audio engine, codecs, DSP) is compiled into
336336+`libfirmware.a` and linked with two Rust static libraries
337337+(`librockbox_cli.a`, `librockbox_server.a`) and SDL2 by the Zig build script.
338338+The result is a single `rockboxd` binary. Rust crates expose the firmware over
339339+gRPC, GraphQL, HTTP, and MPD, and implement output sinks (AirPlay, Squeezelite,
340340+Snapcast) and the Typesense search integration.
214341215215-## ๐ GraphQL API
342342+---
216343217217-Open [http://localhost:6062/graphiql](http://localhost:6062/graphiql) in your
218218-browser.
344344+## ๐ APIs
345345+346346+### GraphQL
347347+348348+Open [http://localhost:6062/graphiql](http://localhost:6062/graphiql) in your browser.
219349220350<p style="margin-top: 20px; margin-bottom: 20px;">
221351 <img src="./docs/graphql.png" width="100%" />
222352</p>
223353224224-## ๐ HTTP API
354354+### HTTP REST
225355226356Open [http://localhost:6063](http://localhost:6063) in your browser.
227357···229359 <img src="./docs/http-api.png" width="100%" />
230360</p>
231361232232-## ๐ gRPC API
362362+### gRPC
233363234234-[https://buf.build/tsiry/rockboxapis/docs/main:rockbox.v1alpha1](https://buf.build/tsiry/rockboxapis/docs/main:rockbox.v1alpha1)
364364+Docs: [buf.build/tsiry/rockboxapis](https://buf.build/tsiry/rockboxapis/docs/main:rockbox.v1alpha1)
235365236236-Try Rockbox gRPC API using
366366+Try it live with
237367[Buf Studio](https://buf.build/studio/tsiry/rockboxapis/rockbox.v1alpha1.LibraryService/GetAlbums?target=http%3A%2F%2Flocalhost%3A6061&selectedProtocol=grpc-web).
238368239369<p style="margin-top: 20px; margin-bottom: 20px;">