mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-29 07:34:13 +01:00
Release builds use opt-level "s" with fat LTO. On Android arm64 the backend library goes from 20.9 MB to 17.3 MB. CPU-bound code keeps opt-level 3: the mobile and core crates and the FLAC and image decoders. At "s" the Direct USB resampler ran six times slower (251 ms against 40 ms for ten seconds of audio on the build machine, with the same output) and the cover and Hi-Res tests took longer (0.09 s against 0.05 s, 0.90 s against 0.76 s). Keeping these fast costs 0.44 MB. Dependencies are trimmed: zip inflates with the flate2 backend the tree already links, rustls-pemfile gives way to the PEM parser of rustls-pki-types, and regex drops the engines the app can do without. Its lazy DFA stays for 0.09 MB, as log redaction ran fifty times slower without it (60 against 1.1 microseconds a line).
123 lines
4.7 KiB
TOML
123 lines
4.7 KiB
TOML
[workspace]
|
|
members = ["crates/core", "crates/network", "crates/providers", "crates/extensions", "crates/mobile", "crates/desktop", "crates/link", "crates/cast", "crates/bindgen"]
|
|
exclude = ["vendor/rustix-1.1.6", "vendor/libusb1-sys-0.7.0", "vendor/cap-primitives-4.0.3"]
|
|
resolver = "3"
|
|
|
|
[patch.crates-io]
|
|
# Android < 30 may kill processes that probe statx directly (SIGSYS).
|
|
# Keep all direct and transitive users on the same compatibility fix.
|
|
rustix = { path = "vendor/rustix-1.1.6" }
|
|
libusb1-sys = { path = "vendor/libusb1-sys-0.7.0" }
|
|
# Preserve the UNC root when deriving Windows paths from directory handles.
|
|
cap-primitives = { path = "vendor/cap-primitives-4.0.3" }
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
rust-version = "1.99.0"
|
|
license = "LGPL-3.0-only"
|
|
publish = false
|
|
|
|
[workspace.dependencies]
|
|
image = { version = "=0.25.10", default-features = false, features = ["jpeg", "png", "gif", "webp"] }
|
|
mornye-core = { path = "crates/core" }
|
|
mornye-extensions = { path = "crates/extensions" }
|
|
mornye-network = { path = "crates/network" }
|
|
mornye-providers = { path = "crates/providers" }
|
|
mornye-cast = { path = "crates/cast" }
|
|
# Crates enable `bindgen` per target: rquickjs-sys ships Windows bindings.
|
|
rquickjs = "=0.14.0"
|
|
base64 = "0.23"
|
|
sha2 = "0.11"
|
|
sha1 = "0.11"
|
|
md-5 = "0.11"
|
|
hmac = "0.13"
|
|
aes-gcm = "=0.11.1"
|
|
aes = { version = "=0.9.4", features = ["zeroize"] }
|
|
blowfish = { version = "=0.10.0", features = ["zeroize"] }
|
|
zeroize = "1.8"
|
|
getrandom = "0.4"
|
|
tempfile = "3.27"
|
|
zip = { version = "=9.6.0", default-features = false, features = ["deflate-flate2"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = { version = "1.0", features = ["float_roundtrip", "raw_value"] }
|
|
thiserror = "2.0"
|
|
uniffi = { version = "=0.32.2", default-features = false }
|
|
tokio = { version = "=1.54.1", features = ["rt-multi-thread", "net", "time", "sync", "io-util", "macros"] }
|
|
hyper-util = { version = "=0.1.21", features = ["client-legacy", "http1", "http2", "tokio"] }
|
|
hyper-rustls = { version = "=0.27.10", default-features = false, features = ["http1", "http2", "ring", "tls12"] }
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
|
|
rustls-native-certs = "=0.8.5"
|
|
rustls-platform-verifier = "=0.7.1"
|
|
http = "1.4"
|
|
http-body-util = "0.1"
|
|
bytes = "1.11"
|
|
futures-util = "0.3"
|
|
tokio-util = { version = "0.7", features = ["io"] }
|
|
async-compression = { version = "0.4", features = ["tokio", "gzip"] }
|
|
tower-service = "0.3"
|
|
hickory-proto = { version = "=0.26.3", default-features = false, features = ["std"] }
|
|
cookie = "0.18"
|
|
url = "2.5"
|
|
# The lazy DFA stays: without it log redaction runs fifty times slower.
|
|
regex = { version = "=1.13.1", default-features = false, features = ["std", "perf-cache", "perf-dfa", "perf-literal", "unicode-case", "unicode-perl"] }
|
|
scraper = { version = "=0.29.0", default-features = false }
|
|
# Keep the parser compatible with scraper's HtmlTreeSink implementation.
|
|
html5ever = "=0.40.1"
|
|
# Match the Unicode 15 tables used by the Go backend's title/artist matching.
|
|
unicode-normalization = "=0.1.22"
|
|
unicode-general-category = "=0.6.0"
|
|
time = { version = "=0.3.55", features = ["parsing"] }
|
|
# Pure-Rust FLAC decoder for the Hi-Res authenticity check.
|
|
claxon = "=0.4.3"
|
|
chrono = { version = "=0.4.45", default-features = false, features = ["clock"] }
|
|
tz-rs = "=0.7.3"
|
|
httpdate = "=1.0.3"
|
|
cap-std = "=4.0.3"
|
|
rustix = { version = "=1.1.6", features = ["fs"] }
|
|
roxmltree = "=0.21.2"
|
|
rusqlite = { version = "=0.43.0", features = ["bundled", "modern_sqlite"] }
|
|
libc = "=0.2.191"
|
|
windows-sys = "0.61"
|
|
# Desktop library folder watching (crates/desktop).
|
|
notify = "=8.2.2"
|
|
# Mornye Link server (crates/link): HTTPS, WebSocket, mDNS, certificates.
|
|
mornye-link = { path = "crates/link" }
|
|
hyper = { version = "=1.12.0", features = ["server", "http1"] }
|
|
tokio-rustls = { version = "=0.26.6", default-features = false, features = ["ring", "tls12"] }
|
|
tokio-tungstenite = { version = "=0.30.0", default-features = false, features = ["handshake"] }
|
|
mdns-sd = "=0.21.7"
|
|
rcgen = { version = "=0.14.10", default-features = false, features = ["crypto", "ring", "pem"] }
|
|
# Already in the tree through mdns-sd and tokio: interface addresses and a
|
|
# dual-stack listener.
|
|
if-addrs = "=0.15.0"
|
|
socket2 = "0.6"
|
|
|
|
[workspace.lints.rust]
|
|
unsafe_code = "deny"
|
|
|
|
[profile.release]
|
|
opt-level = "s"
|
|
lto = "fat"
|
|
codegen-units = 1
|
|
|
|
# Audio and image work is CPU bound and keeps the speed level: the Direct USB
|
|
# resampler runs six times slower at "s". Costs about 0.4 MB on Android.
|
|
[profile.release.package.mornye-mobile]
|
|
opt-level = 3
|
|
|
|
[profile.release.package.mornye-core]
|
|
opt-level = 3
|
|
|
|
[profile.release.package.claxon]
|
|
opt-level = 3
|
|
|
|
[profile.release.package.image]
|
|
opt-level = 3
|
|
|
|
[profile.release.package.zune-jpeg]
|
|
opt-level = 3
|
|
|
|
[profile.release.package.png]
|
|
opt-level = 3
|