[package]
name = "musicdb-server"
version = "0.1.0"
edition = "2024"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
musicdb-lib = { path = "../musicdb-lib" }
clap = { version = "4.5.45", features = ["derive"] }
headers = "0.4.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.47.1", optional = true, features = ["rt"] }
rocket = { version = "0.5.1", optional = true }
html-escape = { version = "0.2.13", optional = true }
rocket_ws = "0.1.1"
rocket_seek_stream = "0.2.6"

[target.aarch64-linux-android.dependencies]
# required for cross-compilation to android to work: link to shared c++ stdlib instead of c++_static
oboe-sys = { version = "*", features = ["shared-stdcxx"] }

[features]
default = ["website", "default-playback"]
website = ["dep:tokio", "dep:rocket", "dep:html-escape"]
playback = []
default-playback = ["playback", "musicdb-lib/default-playback"]
playback-via-sleep = ["playback", "musicdb-lib/playback-via-sleep"]
playback-via-mpv = ["playback", "musicdb-lib/playback-via-mpv"]
playback-via-playback-rs = ["playback", "musicdb-lib/playback-via-playback-rs"]
playback-via-rodio = ["playback", "musicdb-lib/playback-via-rodio"]
