[package] name = "crabidy-server" version.workspace = true edition.workspace = true [[bin]] name = "crabidy-server" path = "src/main.rs" # Everything is on by default: a plain build is the full server. Tailor a # smaller binary with `--no-default-features --features …` # (architecture/build-features.md D1). Feature names are exactly the # names in `crabidy-server.toml`'s `providers` list (D3), so one # vocabulary covers the compile-time and the runtime switch. [features] default = ["all-providers", "opus", "spectrum", "web-ui"] # Every provider this binary can mount. all-providers = [ "tidal", "youtube", "fyyd", "abs", "soundcloud", "jamendo", "rss", "fs", ] # Internal marker: every provider feature enables it, so code can ask "is any # provider compiled in?" — which Cargo features cannot express directly. Only # a build with no providers at all (legal, see D2) leaves it off. _any-provider = [] tidal = ["dep:tidaldy", "_any-provider"] youtube = ["dep:ytdy", "_any-provider"] fyyd = ["dep:fyyd", "_any-provider"] abs = ["dep:absdy", "_any-provider"] soundcloud = ["dep:soundclouddy", "_any-provider"] jamendo = ["dep:jamendody", "_any-provider"] rss = ["dep:rssdy", "_any-provider"] # Local files *and* persistent state (D5): the `/fs` mount, the content # store behind `/crabidy` and `/orphans`, bookmarks/captures, queue # persistence, and the `scan` command. Off means the server keeps its # queue in memory only. fs = ["dep:fsdy", "dep:blake3", "dep:reqwest", "_any-provider"] # Ogg-Opus decoding. Off also drops the bundled libopus C build # (cmake + ninja) and `.opus` from what `scan` indexes (D6). opus = ["audio-player/opus"] # The server-side FFT that feeds clients' spectrum bars (D8). spectrum = ["dep:realfft"] # The embedded web client (architecture/web-client.md). Disable for a # headless-only binary without the bundle. web-ui = ["dep:tonic-web", "dep:include_dir"] [dependencies] anyhow.workspace = true argon2.workspace = true async-trait.workspace = true axum.workspace = true base64.workspace = true blake3 = { workspace = true, optional = true } clap.workspace = true http.workspace = true include_dir = { workspace = true, optional = true } realfft = { workspace = true, optional = true } tonic-web = { workspace = true, optional = true } tower.workspace = true # default-features = false so the server's own `opus` feature decides # whether the libopus decoder is linked (D1). audio-player = { workspace = true, default-features = false } # The `client` feature pulls in the gRPC executor used by the # library/queue/global subcommands (architecture/cli.md D1/D3). cbd-cli = { workspace = true, features = ["client"] } crabidy-core.workspace = true dirs.workspace = true flume.workspace = true absdy = { workspace = true, optional = true } fsdy = { workspace = true, optional = true } fyyd = { workspace = true, optional = true } jamendody = { workspace = true, optional = true } rssdy = { workspace = true, optional = true } futures.workspace = true rand.workspace = true reqwest = { workspace = true, optional = true } serde.workspace = true soundclouddy = { workspace = true, optional = true } thiserror.workspace = true tidaldy = { workspace = true, optional = true } tokio = { workspace = true, features = ["full"] } toml.workspace = true tokio-stream = { workspace = true, features = ["sync"] } tonic = { workspace = true, features = ["router", "transport", "codegen"] } tracing.workspace = true tracing-appender.workspace = true tracing-subscriber.workspace = true ytdy = { workspace = true, optional = true } [dev-dependencies] argon2.workspace = true base64.workspace = true http.workspace = true tempfile.workspace = true tower.workspace = true # Default features only (clap-only): generating completions and a man page # must not drag tonic into ordinary builds (architecture/cli.md D7). [build-dependencies] cbd-cli.workspace = true clap.workspace = true