[package]
edition = "2024"
name = "moosicbox_server"
version = "0.2.0"
authors = ["Braden Steffaniak"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "MoosicBox server package"
readme = "README.md"
keywords = [
"api",
"audio",
"moosicbox",
"server",
]
categories = ["multimedia"]
license = "MPL-2.0"
repository = "https://github.com/MoosicBox/MoosicBox"
[package.metadata]
examples = false
tests = false
[package.metadata.cargo-machete]
ignored = [
"strum",
"tracy-client",
]
[package.metadata.cargo-udeps.ignore]
normal = [
"moosicbox_schema",
"tracy-client",
]
[features]
admin-htmx = ["admin-htmx-api"]
admin-htmx-api = [
"dep:actix-htmx",
"dep:moosicbox_admin_htmx",
"moosicbox_admin_htmx?/api",
]
all-apis = [
"app-apis",
"player-api",
"upnp-api",
]
all-decoders = [
"all-os-decoders",
"decoder-mp3",
"moosicbox_downloader?/all-decoders",
"moosicbox_files/all-decoders",
"moosicbox_player?/all-decoders",
]
all-encoders = [
"all-os-encoders",
"encoder-mp3",
"moosicbox_files/all-encoders",
"moosicbox_library?/all-encoders",
"moosicbox_library_music_api?/all-encoders",
"moosicbox_player?/all-encoders",
"moosicbox_tunnel_sender?/all-encoders",
]
all-formats = [
"all-os-formats",
"format-mp3",
"moosicbox_downloader?/all-formats",
"moosicbox_files/all-formats",
"moosicbox_library?/all-formats",
"moosicbox_library_music_api?/all-formats",
"moosicbox_music_models/all-formats",
"moosicbox_player?/all-formats",
"moosicbox_scan?/all-formats",
"moosicbox_session/all-formats",
"moosicbox_tunnel_sender?/all-formats",
]
all-os-decoders = [
"decoder-aac",
"decoder-flac",
"decoder-opus",
"moosicbox_downloader?/all-os-decoders",
"moosicbox_files/all-os-decoders",
"moosicbox_player?/all-os-decoders",
]
all-os-encoders = [
"encoder-aac",
"encoder-flac",
"encoder-opus",
"moosicbox_files/all-os-encoders",
"moosicbox_library?/all-os-encoders",
"moosicbox_library_music_api?/all-os-encoders",
"moosicbox_player?/all-os-encoders",
"moosicbox_tunnel_sender?/all-os-encoders",
]
all-os-formats = [
"format-aac",
"format-flac",
"format-opus",
"moosicbox_downloader?/all-os-formats",
"moosicbox_files/all-os-formats",
"moosicbox_library?/all-os-formats",
"moosicbox_library_music_api?/all-os-formats",
"moosicbox_music_models/all-os-formats",
"moosicbox_player?/all-os-formats",
"moosicbox_scan?/all-os-formats",
"moosicbox_session/all-os-formats",
"moosicbox_tunnel_sender?/all-os-formats",
]
all-sources = [
"qobuz",
"tidal",
"yt",
]
app-apis = [
"admin-htmx-api",
"audio-output-api",
"audio-zone-api",
"auth-api",
"config-api",
"downloader-api",
"files-api",
"library-api",
"menu-api",
"music-api-api",
"qobuz-api",
"scan-api",
"search-api",
"session-api",
"tidal-api",
"yt-api",
]
asio = [
"moosicbox_audio_output/asio",
"moosicbox_player?/asio",
]
audio-output-api = ["moosicbox_audio_output/api"]
audio-zone-api = ["moosicbox_audio_zone/api"]
auth-api = [
"dep:moosicbox_auth",
"moosicbox_auth?/api",
]
base64 = [
"moosicbox_admin_htmx?/base64",
"moosicbox_tunnel?/base64",
"moosicbox_tunnel_sender?/base64",
]
config-api = []
cpal = [
"moosicbox_audio_output/cpal",
"moosicbox_player?/cpal",
]
decoder-aac = [
"format-aac",
"moosicbox_downloader?/decoder-aac",
"moosicbox_files/decoder-aac",
"moosicbox_player?/decoder-aac",
]
decoder-flac = [
"format-flac",
"moosicbox_downloader?/decoder-flac",
"moosicbox_files/decoder-flac",
"moosicbox_player?/decoder-flac",
]
decoder-mp3 = [
"format-mp3",
"moosicbox_downloader?/decoder-mp3",
"moosicbox_files/decoder-mp3",
"moosicbox_player?/decoder-mp3",
]
decoder-opus = [
"format-opus",
"moosicbox_downloader?/decoder-opus",
"moosicbox_files/decoder-opus",
"moosicbox_player?/decoder-opus",
]
default = [
"all-apis",
"all-formats",
"all-sources",
"base64",
"cpal",
"openapi",
"profiling",
"sqlite-sqlx",
"telemetry",
"tunnel",
]
downloader = [
"dep:throttle",
"moosicbox_downloader/api",
]
downloader-api = [
"dep:moosicbox_downloader",
"downloader",
]
encoder-aac = [
"format-aac",
"moosicbox_files/encoder-aac",
"moosicbox_library?/encoder-aac",
"moosicbox_library_music_api?/encoder-aac",
"moosicbox_player?/encoder-aac",
"moosicbox_tunnel_sender?/encoder-aac",
]
encoder-flac = [
"format-flac",
"moosicbox_files/encoder-flac",
"moosicbox_library?/encoder-flac",
"moosicbox_library_music_api?/encoder-flac",
"moosicbox_player?/encoder-flac",
"moosicbox_tunnel_sender?/encoder-flac",
]
encoder-mp3 = [
"format-mp3",
"moosicbox_files/encoder-mp3",
"moosicbox_library?/encoder-mp3",
"moosicbox_library_music_api?/encoder-mp3",
"moosicbox_player?/encoder-mp3",
"moosicbox_tunnel_sender?/encoder-mp3",
]
encoder-opus = [
"format-opus",
"moosicbox_files/encoder-opus",
"moosicbox_library?/encoder-opus",
"moosicbox_library_music_api?/encoder-opus",
"moosicbox_player?/encoder-opus",
"moosicbox_tunnel_sender?/encoder-opus",
]
fail-on-warnings = [
"moosicbox_admin_htmx?/fail-on-warnings",
"moosicbox_assert/fail-on-warnings",
"moosicbox_async_service/fail-on-warnings",
"moosicbox_audio_output/fail-on-warnings",
"moosicbox_audio_zone/fail-on-warnings",
"moosicbox_auth?/fail-on-warnings",
"moosicbox_config/fail-on-warnings",
"moosicbox_downloader?/fail-on-warnings",
"moosicbox_env_utils/fail-on-warnings",
"moosicbox_files/fail-on-warnings",
"moosicbox_json_utils/fail-on-warnings",
"moosicbox_library?/fail-on-warnings",
"moosicbox_library_music_api?/fail-on-warnings",
"moosicbox_log_runtime/fail-on-warnings",
"moosicbox_menu?/fail-on-warnings",
"moosicbox_middleware/fail-on-warnings",
"moosicbox_music_api/fail-on-warnings",
"moosicbox_music_api_api?/fail-on-warnings",
"moosicbox_music_models/fail-on-warnings",
"moosicbox_player?/fail-on-warnings",
"moosicbox_profiles/fail-on-warnings",
"moosicbox_qobuz?/fail-on-warnings",
"moosicbox_scan?/fail-on-warnings",
"moosicbox_schema?/fail-on-warnings",
"moosicbox_search?/fail-on-warnings",
"moosicbox_session/fail-on-warnings",
"moosicbox_tidal?/fail-on-warnings",
"moosicbox_tunnel?/fail-on-warnings",
"moosicbox_tunnel_sender?/fail-on-warnings",
"moosicbox_upnp?/fail-on-warnings",
"moosicbox_ws/fail-on-warnings",
"moosicbox_yt?/fail-on-warnings",
"switchy_async/fail-on-warnings",
"switchy_database/fail-on-warnings",
"switchy_database_connection/fail-on-warnings",
"switchy_env/fail-on-warnings",
"switchy_fs/fail-on-warnings",
"switchy_mdns/fail-on-warnings",
"switchy_random/fail-on-warnings",
"switchy_telemetry?/fail-on-warnings",
"switchy_time/fail-on-warnings",
"switchy_upnp?/fail-on-warnings",
]
files-api = ["moosicbox_files/api"]
format-aac = [
"moosicbox_downloader?/format-aac",
"moosicbox_files/format-aac",
"moosicbox_library?/format-aac",
"moosicbox_library_music_api?/format-aac",
"moosicbox_music_models/aac",
"moosicbox_player?/format-aac",
"moosicbox_scan?/aac",
"moosicbox_session/aac",
"moosicbox_tunnel_sender?/format-aac",
]
format-flac = [
"moosicbox_downloader?/format-flac",
"moosicbox_files/format-flac",
"moosicbox_library?/format-flac",
"moosicbox_library_music_api?/format-flac",
"moosicbox_music_models/flac",
"moosicbox_player?/format-flac",
"moosicbox_scan?/flac",
"moosicbox_session/flac",
"moosicbox_tunnel_sender?/format-flac",
]
format-mp3 = [
"moosicbox_downloader?/format-mp3",
"moosicbox_files/format-mp3",
"moosicbox_library?/format-mp3",
"moosicbox_library_music_api?/format-mp3",
"moosicbox_music_models/mp3",
"moosicbox_player?/format-mp3",
"moosicbox_scan?/mp3",
"moosicbox_session/mp3",
"moosicbox_tunnel_sender?/format-mp3",
]
format-opus = [
"moosicbox_downloader?/format-opus",
"moosicbox_files/format-opus",
"moosicbox_library?/format-opus",
"moosicbox_library_music_api?/format-opus",
"moosicbox_music_models/opus",
"moosicbox_player?/format-opus",
"moosicbox_scan?/opus",
"moosicbox_session/opus",
"moosicbox_tunnel_sender?/format-opus",
]
jack = [
"moosicbox_audio_output/jack",
"moosicbox_player?/jack",
]
library = [
"moosicbox_library/api",
"moosicbox_library_music_api/api",
]
library-api = [
"dep:moosicbox_library",
"library",
]
menu-api = ["dep:moosicbox_menu"]
music-api-api = ["dep:moosicbox_music_api_api"]
openapi = [
"dep:utoipa",
"dep:utoipa-rapidoc",
"dep:utoipa-redoc",
"dep:utoipa-scalar",
"dep:utoipa-swagger-ui",
"moosicbox_audio_output/openapi",
"moosicbox_audio_zone/openapi",
"moosicbox_auth?/openapi",
"moosicbox_config/openapi",
"moosicbox_downloader?/openapi",
"moosicbox_files/openapi",
"moosicbox_library?/openapi",
"moosicbox_menu?/openapi",
"moosicbox_music_api/openapi",
"moosicbox_music_api_api?/openapi",
"moosicbox_music_models/openapi",
"moosicbox_player?/openapi",
"moosicbox_qobuz?/openapi",
"moosicbox_scan?/openapi",
"moosicbox_search?/openapi",
"moosicbox_session/openapi",
"moosicbox_tidal?/openapi",
"moosicbox_upnp?/openapi",
"moosicbox_yt?/openapi",
"switchy_upnp?/openapi",
]
player = [
"dep:moosicbox_library",
"dep:moosicbox_player",
"moosicbox_upnp?/player",
]
player-api = [
"moosicbox_player?/api",
"player",
]
postgres = [
"dep:moosicbox_schema",
"moosicbox_schema?/postgres",
"switchy_database/postgres",
"switchy_database_connection/creds",
"switchy_database_connection/postgres",
]
postgres-native-tls = ["switchy_database_connection/postgres-native-tls"]
postgres-openssl = ["switchy_database_connection/postgres-openssl"]
postgres-raw = [
"postgres",
"switchy_database/postgres-raw",
"switchy_database_connection/postgres-raw",
]
postgres-sqlx = [
"postgres",
"switchy_database/postgres-sqlx",
"switchy_database_connection/postgres-sqlx",
]
profiling = [
"dep:profiling",
"moosicbox_files/profiling",
"moosicbox_player?/profiling",
]
profiling-puffin = [
"dep:puffin",
"dep:puffin_http",
"profiling",
"profiling/profile-with-puffin",
]
profiling-tracing = [
"dep:tracing-subscriber",
"profiling",
]
profiling-tracy = [
"dep:tracy-client",
"profiling",
"profiling/profile-with-tracy",
]
qobuz = [
"dep:moosicbox_qobuz",
"moosicbox_admin_htmx?/qobuz",
"moosicbox_music_api_api?/auth-username-password",
]
qobuz-api = ["moosicbox_qobuz?/api"]
scan = [
"dep:throttle",
"moosicbox_admin_htmx?/scan",
"moosicbox_qobuz?/scan",
"moosicbox_scan/api",
"moosicbox_tidal?/scan",
"moosicbox_yt?/scan",
]
scan-api = [
"dep:moosicbox_scan",
"scan",
]
search = ["moosicbox_search/api"]
search-api = [
"dep:moosicbox_search",
"search",
]
session-api = ["moosicbox_session/api"]
simulator = [
"moosicbox_library_music_api?/simulator",
"moosicbox_search?/simulator",
"moosicbox_upnp?/simulator",
"switchy_async/simulator",
"switchy_database/simulator",
"switchy_database_connection/simulator",
"switchy_env/simulator",
"switchy_fs/simulator",
"switchy_mdns/simulator",
"switchy_random/simulator",
"switchy_telemetry?/simulator",
"switchy_time/simulator",
"switchy_upnp?/simulator",
]
sqlite = [
"dep:moosicbox_schema",
"moosicbox_schema?/sqlite",
"switchy_database/sqlite",
"switchy_database_connection/sqlite",
]
sqlite-rusqlite = [
"sqlite",
"switchy_database/sqlite-rusqlite",
"switchy_database_connection/sqlite-rusqlite",
]
sqlite-sqlx = [
"sqlite",
"switchy_database/sqlite-sqlx",
"switchy_database_connection/sqlite-sqlx",
]
static-token-auth = [
"dep:qstring",
"dep:subtle",
]
telemetry = ["dep:switchy_telemetry"]
tidal = [
"dep:moosicbox_tidal",
"moosicbox_admin_htmx?/tidal",
"moosicbox_music_api_api?/auth-poll",
]
tidal-api = ["moosicbox_tidal?/api"]
tls = [
"actix-web/openssl",
"dep:openssl",
"dep:rcgen",
"switchy_database/tls",
"switchy_database_connection/tls",
]
tunnel = [
"dep:moosicbox_auth",
"dep:moosicbox_tunnel",
"dep:moosicbox_tunnel_sender",
"moosicbox_middleware/tunnel",
]
upnp = [
"dep:moosicbox_upnp",
"dep:switchy_upnp",
"player",
]
upnp-api = [
"dep:moosicbox_upnp",
"dep:switchy_upnp",
"upnp",
]
yt = ["dep:moosicbox_yt"]
yt-api = ["moosicbox_yt?/api"]
[lib]
name = "moosicbox_server"
path = "src/lib.rs"
[[bin]]
name = "moosicbox_server"
path = "src/main.rs"
required-features = []
[dependencies.actix-cors]
version = "0.7.1"
[dependencies.actix-htmx]
version = "0.4.1"
optional = true
[dependencies.actix-web]
version = "4.13.0"
[dependencies.actix-ws]
version = "0.4.0"
[dependencies.console-subscriber]
version = "0.5.0"
[dependencies.flume]
version = "0.12.0"
[dependencies.futures-util]
version = "0.3.32"
features = ["std"]
default-features = false
[dependencies.local-ip-address]
version = "0.6.13"
[dependencies.log]
version = "0.4.29"
features = ["release_max_level_trace"]
[dependencies.moosicbox_admin_htmx]
version = "0.2.0"
optional = true
default-features = false
[dependencies.moosicbox_assert]
version = "0.2.0"
default-features = false
[dependencies.moosicbox_async_service]
version = "0.2.0"
default-features = false
[dependencies.moosicbox_audio_output]
version = "0.2.0"
default-features = false
[dependencies.moosicbox_audio_zone]
version = "0.2.0"
features = [
"api",
"events",
]
default-features = false
[dependencies.moosicbox_auth]
version = "0.2.0"
optional = true
default-features = false
[dependencies.moosicbox_config]
version = "0.2.0"
features = [
"api",
"db",
]
default-features = false
[dependencies.moosicbox_downloader]
version = "0.2.0"
features = ["api"]
optional = true
default-features = false
[dependencies.moosicbox_env_utils]
version = "0.2.0"
default-features = false
[dependencies.moosicbox_files]
version = "0.2.0"
features = [
"files",
"image",
"range",
"track-range",
]
default-features = false
[dependencies.moosicbox_json_utils]
version = "0.2.0"
features = ["database"]
default-features = false
[dependencies.moosicbox_library]
version = "0.2.0"
features = ["api"]
optional = true
default-features = false
[dependencies.moosicbox_library_music_api]
version = "0.2.0"
optional = true
default-features = false
[dependencies.moosicbox_log_runtime]
version = "0.2.0"
features = [
"env-filter",
"file",
"layer-ext",
"log-compat",
]
default-features = false
[dependencies.moosicbox_menu]
version = "0.2.0"
features = ["api"]
optional = true
default-features = false
[dependencies.moosicbox_middleware]
version = "0.2.0"
default-features = false
[dependencies.moosicbox_music_api]
version = "0.2.0"
default-features = false
[dependencies.moosicbox_music_api_api]
version = "0.2.0"
features = ["api"]
optional = true
default-features = false
[dependencies.moosicbox_music_models]
version = "0.2.0"
default-features = false
[dependencies.moosicbox_player]
version = "0.2.0"
features = ["local"]
optional = true
default-features = false
[dependencies.moosicbox_profiles]
version = "0.2.0"
features = [
"api",
"events",
]
default-features = false
[dependencies.moosicbox_qobuz]
version = "0.2.0"
features = ["db"]
optional = true
default-features = false
[dependencies.moosicbox_scan]
version = "0.2.0"
features = [
"api",
"local",
]
optional = true
default-features = false
[dependencies.moosicbox_schema]
version = "0.2.0"
optional = true
default-features = false
[dependencies.moosicbox_search]
version = "0.2.0"
features = ["api"]
optional = true
default-features = false
[dependencies.moosicbox_session]
version = "0.2.0"
features = ["events"]
default-features = false
[dependencies.moosicbox_tidal]
version = "0.2.0"
features = ["db"]
optional = true
default-features = false
[dependencies.moosicbox_tunnel]
version = "0.2.0"
optional = true
default-features = false
[dependencies.moosicbox_tunnel_sender]
version = "0.2.0"
optional = true
default-features = false
[dependencies.moosicbox_upnp]
version = "0.2.0"
features = [
"listener",
"player",
]
optional = true
default-features = false
[dependencies.moosicbox_ws]
version = "0.2.0"
features = ["ws"]
default-features = false
[dependencies.moosicbox_yt]
version = "0.2.0"
features = ["db"]
optional = true
default-features = false
[dependencies.openssl]
version = "0.10.80"
features = ["v110"]
optional = true
[dependencies.profiling]
version = "1.0.18"
optional = true
[dependencies.puffin]
version = "0.20.0"
optional = true
[dependencies.puffin_http]
version = "0.17.0"
optional = true
[dependencies.qstring]
version = "0.7.2"
optional = true
[dependencies.rcgen]
version = "0.14.8"
optional = true
[dependencies.serde_json]
version = "1.0.149"
[dependencies.strum]
version = "0.28.0"
[dependencies.strum_macros]
version = "0.28.0"
[dependencies.subtle]
version = "2.6.1"
optional = true
[dependencies.switchy_async]
version = "0.2.0"
features = [
"macros",
"sync",
"tokio",
]
default-features = false
[dependencies.switchy_database]
version = "0.2.0"
features = ["api"]
default-features = false
[dependencies.switchy_database_connection]
version = "0.2.0"
features = []
default-features = false
[dependencies.switchy_env]
version = "0.2.0"
features = ["std"]
default-features = false
[dependencies.switchy_fs]
version = "0.2.0"
features = ["std"]
default-features = false
[dependencies.switchy_mdns]
version = "0.2.0"
default-features = false
[dependencies.switchy_random]
version = "0.2.0"
features = ["rand"]
default-features = false
[dependencies.switchy_telemetry]
version = "0.2.0"
features = ["actix"]
optional = true
default-features = false
[dependencies.switchy_time]
version = "0.2.0"
features = ["std"]
default-features = false
[dependencies.switchy_upnp]
version = "0.2.0"
features = ["api"]
optional = true
default-features = false
[dependencies.thiserror]
version = "2.0.18"
[dependencies.throttle]
version = "0.1.0"
optional = true
[dependencies.tokio]
version = "1.52.3"
features = [
"macros",
"rt",
"time",
"tracing",
]
[dependencies.tokio-util]
version = "0.7.18"
[dependencies.tracing-subscriber]
version = "0.3.23"
optional = true
[dependencies.tracy-client]
version = "0.18.4"
features = ["enable"]
optional = true
default-features = false
[dependencies.url]
version = "2.5.8"
[dependencies.utoipa]
version = "5.5.0"
features = ["actix_extras"]
optional = true
[dependencies.utoipa-rapidoc]
version = "6.0.0"
features = ["actix-web"]
optional = true
[dependencies.utoipa-redoc]
version = "6.0.0"
features = ["actix-web"]
optional = true
[dependencies.utoipa-scalar]
version = "0.3.0"
features = ["actix-web"]
optional = true
[dependencies.utoipa-swagger-ui]
version = "9.0.2"
features = ["actix-web"]
optional = true