mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00

Add support for choosing between native-tls and rustls-tls backends through feature flags, with native-tls as the default for maximum platform compatibility. Key changes: - Add mutually exclusive native-tls and rustls-tls feature flags - Use conditional compilation to select TLS implementation - Configure rustls-tls with platform certificate verifier - Refactor to workspace-based dependency management - Update CI workflows with improved cross-compilation support - Add comprehensive TLS backend documentation The native-tls backend uses system TLS libraries (OpenSSL on Linux, Secure Transport on macOS, SChannel on Windows) while rustls-tls provides a pure Rust implementation with platform certificate stores.
96 lines
2.6 KiB
TOML
96 lines
2.6 KiB
TOML
[package]
|
|
name = "librespot-playback"
|
|
version.workspace = true
|
|
rust-version.workspace = true
|
|
authors = ["Sasha Hilton <sashahilton00@gmail.com>"]
|
|
license.workspace = true
|
|
description = "The audio playback logic for librespot"
|
|
repository.workspace = true
|
|
edition.workspace = true
|
|
|
|
[features]
|
|
# Refer to the workspace Cargo.toml for the list of features
|
|
default = ["rodio-backend", "native-tls"]
|
|
|
|
# Audio backends
|
|
alsa-backend = ["dep:alsa"]
|
|
gstreamer-backend = [
|
|
"dep:gstreamer",
|
|
"dep:gstreamer-app",
|
|
"dep:gstreamer-audio",
|
|
]
|
|
jackaudio-backend = ["dep:jack"]
|
|
portaudio-backend = ["dep:portaudio-rs"]
|
|
pulseaudio-backend = ["dep:libpulse-binding", "dep:libpulse-simple-binding"]
|
|
rodio-backend = ["dep:cpal", "dep:rodio"]
|
|
rodiojack-backend = ["dep:rodio", "cpal/jack"]
|
|
sdl-backend = ["dep:sdl2"]
|
|
|
|
# Audio processing features
|
|
passthrough-decoder = ["dep:ogg"]
|
|
|
|
# TLS backend propagation
|
|
native-tls = [
|
|
"librespot-core/native-tls",
|
|
"librespot-audio/native-tls",
|
|
"librespot-metadata/native-tls",
|
|
]
|
|
rustls-tls = [
|
|
"librespot-core/rustls-tls",
|
|
"librespot-audio/rustls-tls",
|
|
"librespot-metadata/rustls-tls",
|
|
]
|
|
|
|
[dependencies]
|
|
librespot-audio.workspace = true
|
|
librespot-core.workspace = true
|
|
librespot-metadata.workspace = true
|
|
|
|
portable-atomic = "1"
|
|
futures-util = "0.3"
|
|
log = "0.4"
|
|
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
|
|
shell-words = "1.1"
|
|
thiserror = "2"
|
|
tokio = { version = "1", features = [
|
|
"parking_lot",
|
|
"rt",
|
|
"rt-multi-thread",
|
|
"sync",
|
|
] }
|
|
zerocopy = { version = "0.8", features = ["derive"] }
|
|
|
|
# Backends
|
|
alsa = { version = "0.9", optional = true }
|
|
jack = { version = "0.13", optional = true }
|
|
portaudio-rs = { version = "0.3", optional = true }
|
|
sdl2 = { version = "0.38", optional = true }
|
|
|
|
# GStreamer dependencies
|
|
gstreamer = { version = "0.24", optional = true }
|
|
gstreamer-app = { version = "0.24", optional = true }
|
|
gstreamer-audio = { version = "0.24", optional = true }
|
|
|
|
# PulseAudio dependencies
|
|
libpulse-binding = { version = "2", optional = true, default-features = false }
|
|
libpulse-simple-binding = { version = "2", optional = true, default-features = false }
|
|
|
|
# Rodio dependencies
|
|
cpal = { version = "0.16", optional = true }
|
|
rodio = { version = "0.21", optional = true, default-features = false, features = [
|
|
"playback",
|
|
] }
|
|
|
|
# Container and audio decoder
|
|
symphonia = { version = "0.5", default-features = false, features = [
|
|
"mp3",
|
|
"ogg",
|
|
"vorbis",
|
|
] }
|
|
|
|
# Legacy Ogg container decoder for the passthrough decoder
|
|
ogg = { version = "0.9", optional = true }
|
|
|
|
# Dithering
|
|
rand = { version = "0.9", features = ["small_rng"] }
|
|
rand_distr = "0.5"
|