Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add embedded-daemon feature to expo crate

Make the in-process daemon selectable by feature. Add optional
rockbox-server, rockbox-settings, rockbox-library and rockbox-sys
dependencies with default-features = false and cascade FTS5 via
rockbox-server/fts5. Keep reqwest minimal and add Android JNI dep.

+29 -3
+29 -3
crates/expo/Cargo.toml
··· 2 2 name = "rockbox-expo" 3 3 version = "0.1.0" 4 4 edition = "2021" 5 - description = "C-ABI gRPC client wrapper for embedding in the rockbox-zig Expo (React Native) mobile app" 5 + description = "C-ABI gRPC client + optional embedded rockbox daemon for the Expo (React Native) app" 6 6 license = "LGPL-2.1" 7 7 8 8 [lib] 9 9 name = "rockbox_expo" 10 10 crate-type = ["staticlib", "cdylib"] 11 11 12 + # ── Features ──────────────────────────────────────────────────────────────── 13 + # 14 + # `embedded-daemon`: link the full rockbox firmware + crates/server into the 15 + # cdylib so the phone can play audio in-process. Enabled by the Android build 16 + # script (and later iOS). Cascades to FTS5 search to avoid typesense. 17 + # 18 + # Build: `cargo ndk -t arm64-v8a -- build --features embedded-daemon` 19 + [features] 20 + default = [] 21 + embedded-daemon = [ 22 + "dep:rockbox-server", 23 + "dep:rockbox-settings", 24 + "dep:rockbox-library", 25 + "dep:rockbox-sys", 26 + "rockbox-server/fts5", # cascades to rockbox-graphql/fts5 + rockbox-rpc/fts5 27 + ] 28 + 29 + # ── Always-on dependencies (gRPC client + JNI/Swift glue) ────────────────── 12 30 [dependencies] 13 31 prost = "0.13" 14 32 tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync", "time", "macros"] } ··· 18 36 serde_json = "1" 19 37 futures-util = "0.3" 20 38 rockbox-discovery = { path = "../discovery" } 21 - # Minimal HTTP client for the cast / AirPlay device endpoints (rockboxd 22 - # exposes them over plain HTTP at the http_port — no TLS needed). 23 39 reqwest = { version = "0.12", default-features = false, features = ["json"] } 24 40 41 + # ── Optional in-process daemon (Android cdylib build) ────────────────────── 42 + # `default-features = false` keeps unrelated transitive features (sdl, mpris, 43 + # typesense, …) from sneaking in. The `embedded-daemon` feature explicitly 44 + # selects only what we need. 45 + rockbox-server = { path = "../server", optional = true, default-features = false } 46 + rockbox-settings = { path = "../settings", optional = true, default-features = false } 47 + rockbox-library = { path = "../library", optional = true, default-features = false } 48 + rockbox-sys = { path = "../sys", optional = true, default-features = false } 49 + 50 + # ── Android-only ─────────────────────────────────────────────────────────── 25 51 [target.'cfg(target_os = "android")'.dependencies] 26 52 jni = "0.21" 27 53