Files
SpotiFLAC-Mobile/rust_backend/Cargo.toml
T
zarzet d3d91a4a60 perf(rust): keep the speed level for the extension JavaScript engine
QuickJS, which runs extension scripts, was compiled for size and ran a
script benchmark (JSON, regular expressions, sorting, string
shuffling) 17 percent slower: 139 ms against 117 ms on the build
machine. rquickjs-sys goes back to opt-level 3. On Android arm64 the
backend library grows by 0.33 MB, from 17.34 MB to 17.67 MB.

The Android build passed -Os to every C compile, which overrides the
level of a crate. The flag goes: C code already takes its level from
the Cargo profile, and the library has the same size without it.
2026-11-22 00:50:26 +07:00

128 lines
4.9 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
# The JavaScript engine of extensions runs 17 percent slower at "s". Costs
# 0.33 MB on Android.
[profile.release.package.rquickjs-sys]
opt-level = 3