Files
qbz/crates/qbz-core/Cargo.toml
T
vicrodh 1503b8236f feat(core): read the Windows memory figures from GlobalMemoryStatusEx
detect_profile fell back to MemoryProfile::from_total_kb(u64::MAX) -- the top
tier -- on any machine without /proc/meminfo, and read_memory_pressure
returned None forever. The prefetch and buffer tiers were therefore pinned at
the top on Windows and the memory watchdog was blind: it continues on None, so
evict_l1_audio_cache and the prefetch halt could never fire at any pressure.

Both halves had to land together. With the old u64::MAX total, a working
pressure probe would have computed roughly 0 per cent available and reported
critical permanently.

ullAvailPhys is the analogue of MemAvailable: what an allocation can take
without going to disk. The Normal-fallback contract is preserved, so a probe
that fails still never throttles the machine. windows-sys 0.61 is already in
the workspace lock via qbz-local-catalog and qbzd, so nothing new is pulled.

Measured on a 32 GB box: 57.9 per cent available, class Normal, which is the
same class the old fallback produced -- the change is the true total and a
pressure figure that exists at all.

cc
2026-08-27 12:44:20 -06:00

49 lines
1.3 KiB
TOML

[package]
name = "qbz-core"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Core orchestrator for QBZ music player"
[dependencies]
qbz-models = { path = "../qbz-models" }
qbz-audio = { path = "../qbz-audio" }
qbz-player = { path = "../qbz-player" }
qbz-qobuz = { path = "../qbz-qobuz" }
qbz-radio = { path = "../qbz-radio" }
qbz-integrations = { path = "../qbz-integrations" }
qbz-offline-cache = { path = "../qbz-offline-cache" }
qbz-reco = { path = "../qbz-reco" }
# Async
tokio = { workspace = true }
async-trait = { workspace = true }
# Logging
log = { workspace = true }
# Error handling
thiserror = { workspace = true }
anyhow = { workspace = true }
# Serialization
serde = { workspace = true }
serde_json = { workspace = true }
[target.'cfg(windows)'.dependencies]
# W14: GlobalMemoryStatusEx stands in for /proc/meminfo. 0.61 is already in
# the workspace lock (qbz-local-catalog, qbzd), so this pulls nothing new.
windows-sys = { version = "0.61", features = [
"Win32_System_SystemInformation",
] }
[features]
default = []
# Tier 2 features (to be added later)
# offline = ["qbz-offlineplayback"]
# local-library = ["qbz-locallibrary"]
# cast = ["qbz-cast"]
# scrobbling = ["qbz-scrobbling"]
# plex = ["qbz-plex"]
# full = ["offline", "local-library", "cast", "scrobbling", "plex"]