1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 01:39:28 +02:00
librespot/core/Cargo.toml
Roderick van Domburg 0a4969ffe2
feat: add configurable TLS backend selection with native-tls as default (#1541)
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.
2025-08-19 23:06:28 +02:00

117 lines
3 KiB
TOML

[package]
name = "librespot-core"
version.workspace = true
rust-version.workspace = true
authors = ["Paul Lietar <paul@lietar.net>"]
license.workspace = true
description = "The core functionality provided by librespot"
repository.workspace = true
edition.workspace = true
build = "build.rs"
[features]
# Refer to the workspace Cargo.toml for the list of features
default = ["native-tls"]
# TLS backends (mutually exclusive - see oauth/src/lib.rs for compile-time checks)
# Note: Validation is in oauth since it's compiled first in the dependency tree.
native-tls = [
"dep:hyper-tls",
"hyper-proxy2/tls",
"librespot-oauth/native-tls",
"tokio-tungstenite/native-tls",
]
rustls-tls = [
"dep:hyper-rustls",
"hyper-proxy2/rustls",
"librespot-oauth/rustls-tls",
"tokio-tungstenite/__rustls-tls",
]
[dependencies]
librespot-oauth.workspace = true
librespot-protocol.workspace = true
aes = "0.8"
base64 = "0.22"
byteorder = "1.5"
bytes = "1"
data-encoding = "2.9"
flate2 = "1.1"
form_urlencoded = "1.2"
futures-core = "0.3"
futures-util = { version = "0.3", features = [
"alloc",
"bilock",
"sink",
"unstable",
] }
governor = { version = "0.10", default-features = false, features = [
"std",
"jitter",
] }
hmac = "0.12"
httparse = "1.10"
http = "1.3"
http-body-util = "0.1"
hyper = { version = "1.6", features = ["http1", "http2"] }
hyper-proxy2 = { version = "0.1", default-features = false }
hyper-rustls = { version = "0.27", default-features = false, features = [
"http1",
"http2",
"ring",
"rustls-platform-verifier",
"tls12",
], optional = true }
hyper-tls = { version = "0.6", optional = true }
hyper-util = { version = "0.1", default-features = false, features = [
"client",
"http1",
"http2",
] }
log = "0.4"
nonzero_ext = "0.3"
num-bigint = "0.4"
num-derive = "0.4"
num-integer = "0.1"
num-traits = "0.2"
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
pbkdf2 = { version = "0.12", default-features = false, features = ["hmac"] }
pin-project-lite = "0.2"
priority-queue = "2.5"
protobuf = "3.7"
protobuf-json-mapping = "3.7"
quick-xml = { version = "0.38", features = ["serialize"] }
rand = "0.9"
rsa = "0.9"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sha1 = { version = "0.10", features = ["oid"] }
shannon = "0.2"
sysinfo = { version = "0.36", default-features = false, features = ["system"] }
thiserror = "2"
time = { version = "0.3", features = ["formatting", "parsing"] }
tokio = { version = "1", features = [
"io-util",
"macros",
"net",
"parking_lot",
"rt",
"sync",
"time",
] }
tokio-stream = "0.1"
tokio-tungstenite = { version = "0.27", default-features = false }
tokio-util = { version = "0.7", features = ["codec"] }
url = "2"
uuid = { version = "1", default-features = false, features = ["v4"] }
[build-dependencies]
rand = "0.9"
rand_distr = "0.5"
vergen-gitcl = { version = "1.0", default-features = false, features = [
"build",
] }
[dev-dependencies]
tokio = { version = "1", features = ["macros", "parking_lot"] }