- Make — compiles the Rockbox C firmware into static libraries.
- Cargo — compiles the Rust crates into static libraries (
crate-type = ["staticlib"]). - Zig — links everything (plus CPAL) into a single executable.
Dependencies
- Ubuntu / Debian
- Fedora
- macOS (Homebrew)
- Zig ≥ 0.16 — ziglang.org/download
- Rust stable —
rustup update stable - Deno — for the web UI build
Full build
zig/zig-out/bin/rockboxd.
Iterating on changes
Zig only re-links when the static libraries are newer than the binary. After editing C, runmake lib first. After editing Rust, run
cargo build --release first.
Verifying symbols
Headless build (CPAL / no SDL)
The recommended build path for desktop use is the headless target, which uses CPAL for audio instead of SDL. A convenience script handles all three steps:build-headless/, compiles
the Rust crates with the cpal feature, and links the result with Zig.
Embeddable library (librockboxd.a)
zig build lib produces zig/zig-out/lib/librockboxd.a — a fat archive that
desktop GUIs (GPUI, macOS Swift, Qt, …) can link against to boot the Rockbox
daemon in-process. The public C header is include/rockboxd.h.
Don’t re-run tools/configure
build-lib/ is pre-configured for the sdlapp target; build-headless/ is
pre-configured for the headless target. Re-running tools/configure
regenerates the Makefile and overwrites local edits. If you really need to
reconfigure, do it knowingly and review the resulting diff.