forked from librespot-org/librespot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
211 lines (184 loc) · 8.11 KB
/
Cargo.toml
File metadata and controls
211 lines (184 loc) · 8.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
[package]
name = "librespot"
version = "0.8.0"
rust-version.workspace = true
authors.workspace = true
license.workspace = true
description = "An open source client library for Spotify, with support for Spotify Connect"
keywords = ["audio", "spotify", "music", "streaming", "connect"]
categories = ["multimedia::audio"]
repository.workspace = true
readme = "README.md"
edition.workspace = true
include = [
"src/**/*",
"audio/**/*",
"connect/**/*",
"core/**/*",
"discovery/**/*",
"examples/**/*",
"metadata/**/*",
"oauth/**/*",
"playback/**/*",
"protocol/**/*",
"Cargo.toml",
"README.md",
"LICENSE",
"COMPILING.md",
"CONTRIBUTING.md",
]
[workspace.package]
rust-version = "1.85"
authors = ["Librespot Org"]
license = "MIT"
repository = "https://github.com/librespot-org/librespot"
edition = "2024"
[features]
default = ["native-tls", "rodio-backend", "with-libmdns"]
# TLS backends (mutually exclusive - compile-time checks in oauth/src/lib.rs)
# Note: Feature validation is in oauth crate since it's compiled first in the dependency tree.
# See COMPILING.md for more details on TLS backend selection.
# native-tls: Uses the system's native TLS stack (OpenSSL on Linux, Secure Transport on macOS,
# SChannel on Windows). This is the default as it's well-tested, widely compatible, and integrates
# with system certificate stores. Choose this for maximum compatibility and when you want to use
# system-managed certificates.
native-tls = ["librespot-core/native-tls", "librespot-oauth/native-tls"]
# rustls-tls: Uses the Rust-based rustls TLS implementation with certificate authority (CA)
# verification. This provides a Rust TLS stack (with assembly optimizations). Choose this for
# avoiding external OpenSSL dependencies, reproducible builds, or when targeting platforms where
# native TLS dependencies are unavailable or problematic (musl, embedded, static linking).
#
# Two certificate store options are available:
#
# - rustls-tls-native-roots: Uses rustls with native system certificate stores (ca-certificates on
# Linux, Security.framework on macOS, Windows certificate store on Windows). Best for most users as
# it integrates with system-managed certificates and gets security updates through the OS.
rustls-tls-native-roots = [
"librespot-core/rustls-tls-native-roots",
"librespot-oauth/rustls-tls-native-roots",
]
# rustls-tls-webpki-roots: Uses rustls with Mozilla's compiled-in certificate store (webpki-roots).
# Best for reproducible builds, containerized environments, or when you want certificate handling
# to be independent of the host system.
rustls-tls-webpki-roots = [
"librespot-core/rustls-tls-webpki-roots",
"librespot-oauth/rustls-tls-webpki-roots",
]
# Audio backends - see README.md for audio backend selection guide
# Cross-platform backends:
# rodio-backend: Cross-platform audio backend using Rodio (default). Provides good cross-platform
# compatibility with automatic backend selection. Uses ALSA on Linux, WASAPI on Windows, CoreAudio
# on macOS.
rodio-backend = ["librespot-playback/rodio-backend"]
# rodiojack-backend: Rodio backend with JACK support for professional audio setups.
rodiojack-backend = ["librespot-playback/rodiojack-backend"]
# gstreamer-backend: Uses GStreamer multimedia framework for audio output.
# Provides extensive audio processing capabilities.
gstreamer-backend = ["librespot-playback/gstreamer-backend"]
# portaudio-backend: Cross-platform audio I/O library backend.
portaudio-backend = ["librespot-playback/portaudio-backend"]
# sdl-backend: Simple DirectMedia Layer audio backend.
sdl-backend = ["librespot-playback/sdl-backend"]
# Platform-specific backends:
# alsa-backend: Advanced Linux Sound Architecture backend (Linux only).
# Provides low-latency audio output on Linux systems.
alsa-backend = ["librespot-playback/alsa-backend"]
# pulseaudio-backend: PulseAudio backend (Linux only).
# Integrates with the PulseAudio sound server for advanced audio routing.
pulseaudio-backend = ["librespot-playback/pulseaudio-backend"]
# jackaudio-backend: JACK Audio Connection Kit backend.
# Professional audio backend for low-latency, high-quality audio routing.
jackaudio-backend = ["librespot-playback/jackaudio-backend"]
# Network discovery backends - choose one for Spotify Connect device discovery
# See COMPILING.md for dependencies and platform support.
# with-libmdns: Pure-Rust mDNS implementation (default).
# No external dependencies, works on all platforms. Choose this for simple deployments or when
# avoiding system dependencies.
with-libmdns = ["librespot-discovery/with-libmdns"]
# with-avahi: Uses Avahi daemon for mDNS (Linux only).
# Integrates with system's Avahi service for network discovery. Choose this when you want to
# integrate with existing Avahi infrastructure or need advanced mDNS features. Requires
# libavahi-client-dev.
with-avahi = ["librespot-discovery/with-avahi"]
# with-dns-sd: Uses DNS Service Discovery (cross-platform).
# On macOS uses Bonjour, on Linux uses Avahi compatibility layer. Choose this for tight system
# integration on macOS or when using Avahi's dns-sd compatibility mode on Linux.
with-dns-sd = ["librespot-discovery/with-dns-sd"]
# Audio processing features:
# passthrough-decoder: Enables direct passthrough of Ogg Vorbis streams without decoding.
# Useful for custom audio processing pipelines or when you want to handle audio decoding
# externally. When enabled, audio is not decoded by librespot but passed through as raw Ogg Vorbis
# data.
passthrough-decoder = ["librespot-playback/passthrough-decoder"]
[lib]
name = "librespot"
path = "src/lib.rs"
[[bin]]
name = "librespot"
path = "src/main.rs"
doc = false
[workspace.dependencies]
librespot-audio = { version = "0.8.0", path = "audio", default-features = false }
librespot-connect = { version = "0.8.0", path = "connect", default-features = false }
librespot-core = { version = "0.8.0", path = "core", default-features = false }
librespot-discovery = { version = "0.8.0", path = "discovery", default-features = false }
librespot-metadata = { version = "0.8.0", path = "metadata", default-features = false }
librespot-oauth = { version = "0.8.0", path = "oauth", default-features = false }
librespot-playback = { version = "0.8.0", path = "playback", default-features = false }
librespot-protocol = { version = "0.8.0", path = "protocol", default-features = false }
[dependencies]
librespot-audio.workspace = true
librespot-connect.workspace = true
librespot-core.workspace = true
librespot-discovery.workspace = true
librespot-metadata.workspace = true
librespot-oauth.workspace = true
librespot-playback.workspace = true
librespot-protocol.workspace = true
data-encoding = "2.5"
env_logger = { version = "0.11.2", default-features = false, features = [
"color",
"humantime",
"auto-color",
] }
futures-util = { version = "0.3", default-features = false }
getopts = "0.2"
log = "0.4"
sha1 = "0.10"
sysinfo = { version = "0.36", default-features = false, features = ["system"] }
thiserror = "2"
tokio = { version = "1", features = [
"rt",
"macros",
"signal",
"sync",
"process",
] }
url = "2.2"
[package.metadata.deb]
maintainer = "Librespot Organization <noreply@github.com>"
copyright = "2015, Paul Liétar"
license-file = ["LICENSE", "4"]
depends = "$auto"
recommends = "avahi-daemon"
extended-description = """\
librespot is an open source client library for Spotify. It enables applications \
to use Spotify's service to control and play music via various backends, and to \
act as a Spotify Connect receiver. It is an alternative to the official and now \
deprecated closed-source libspotify. Additionally, it provides extra features \
which are not available in the official library.
.
This package provides the librespot binary for headless Spotify Connect playback. \
.
Note: librespot only works with Spotify Premium accounts."""
section = "sound"
priority = "optional"
assets = [
# Main binary
["target/release/librespot", "usr/bin/", "755"],
# Documentation
["README.md", "usr/share/doc/librespot/", "644"],
# Systemd services
["contrib/librespot.service", "lib/systemd/system/", "644"],
["contrib/librespot.user.service", "lib/systemd/user/", "644"],
]