Unofficial YouTube Music / Spotify Premium client for Android, built in Liquid Glass. Audio effects, Spotify Connect, listening history, 8 languages. Rust core on librespot.
Kotlin alternativeandroidandroid-applicationclientglassmorphisminnertubelibrespotliquid-glassspotifyspotify-connectspotifyapiyoutube-musicyoutube-playerytdlnis
[package]
name = "squarecore"
version = "0.1.0"
edition = "2021"
rust-version = "1.81"
[lib]
name = "squarecore"
crate-type = ["cdylib"]
[dependencies]
# rustls + webpki roots: no OpenSSL to cross-compile, no reliance on the Java keystore.
librespot-core = { version = "0.8", default-features = false, features = ["rustls-tls-webpki-roots"] }
# No backend feature: audio goes to an AudioTrack via src/sink.rs, so
# rodio and cpal are not built at all.
librespot-playback = { version = "0.8", default-features = false, features = ["rustls-tls-webpki-roots"] }
# Spotify Connect. The device only appears in the user's account — and plays
# are only recorded in their history — because this publishes state; nothing
# about decoding audio requires it.
librespot-connect = { version = "0.8", default-features = false, features = ["rustls-tls-webpki-roots"] }
# Only for its fetch parameters: how big a block is asked for, and how long the
# player waits before it starts. The defaults are tuned for a desktop on a fixed
# line; see `engine::tune_fetching`.
librespot-audio = { version = "0.8", default-features = false, features = ["rustls-tls-webpki-roots"] }
librespot-metadata = { version = "0.8", default-features = false, features = ["rustls-tls-webpki-roots"] }
librespot-protocol = { version = "0.8", default-features = false }
protobuf = "3"
tokio = { version = "1", features = ["rt-multi-thread", "sync", "macros", "time"] }
jni = "0.21"
log = "0.4"
once_cell = "1"
# Same major as librespot-core, so `Method` is the type spclient expects.
http = "1.3"
# Reading a CDN response body in chunks; see src/downloads.rs.
http-body-util = "0.1"
# The body type librespot's own HTTP client takes.
bytes = "1"
serde_json = "1"
# The transition recipes of a mixed playlist arrive as base64; see
# catalog::transition_in. The version librespot-core already brings in.
base64 = "0.22"
futures-util = "0.3"
# Decoding the DJ's lines, which arrive as MP3; see src/dj.rs. The same
# version librespot-playback already builds, so nothing new is compiled.
symphonia = { version = "0.5", default-features = false, features = ["mp3"] }
[target.'cfg(target_os = "android")'.dependencies]
ndk-context = "0.1"
android_logger = "0.14"
# librespot-core carries a one-line local patch; see native/vendor/README.md.
# Patching rather than depending on the fork directly means librespot-playback
# and librespot-metadata, which pull librespot-core from crates.io, resolve to
# the patched copy too.
[patch.crates-io]
librespot-core = { path = "vendor/librespot-core" }
librespot-playback = { path = "vendor/librespot-playback" }
librespot-connect = { path = "vendor/librespot-connect" }
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
strip = "symbols"
# Deliberately unwinding, not aborting.
#
# With `abort`, any panic anywhere in the engine — a poisoned mutex, an
# arithmetic edge in a decoder — takes the whole app down with no message the
# user can act on. Unwinding lets the JNI boundary turn a panic into an
# ordinary Java exception (see ffi::guard) and lets a panic on one of
# librespot's own worker threads kill that task instead of the process.
panic = "unwind"