fix: make cpal/ALSA optional — headless Linux builds work without libasound

- cpal is now behind an 'audio' feature flag (off by default)
- --live mode requires --features audio at build time
- --send-tone and --record work on headless servers without audio libs
- Linux build script no longer installs libasound2-dev

Build for headless: cargo build --release
Build with mic/speakers: cargo build --release --features audio

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-27 16:24:44 +04:00
parent 708fb268bc
commit df80ad5343
4 changed files with 18 additions and 4 deletions

View File

@@ -18,7 +18,11 @@ tracing-subscriber = { workspace = true }
async-trait = { workspace = true }
bytes = { workspace = true }
anyhow = "1"
cpal = "0.15"
cpal = { version = "0.15", optional = true }
[features]
default = []
audio = ["cpal"]
[[bin]]
name = "wzp-client"