First step of the Windows x86_64 desktop build: stop pulling
coreaudio-rs into the Windows dependency graph so the project can at
least run `cargo check --target x86_64-pc-windows-msvc`. Software AEC
is already disabled in engine.rs so there's nothing else to stub — the
macOS-specific VPIO path is skipped via #[cfg(target_os = "macos")] on
both sides and Windows falls through to the plain CPAL
AudioCapture/AudioPlayback branch that already existed.
crates/wzp-client/Cargo.toml
- coreaudio-rs optional dep moved under [target.'cfg(target_os = "macos")']
- `vpio` feature now uses `dep:coreaudio-rs` syntax and the gated dep
- Enabling `vpio` on Windows/Linux is a no-op at resolution time
crates/wzp-client/src/lib.rs
- `pub mod audio_vpio` is now #[cfg(all(feature = "vpio", target_os = "macos"))]
- Previously `vpio` alone was enough to try to compile the Core Audio
bindings, which would fail on non-Apple targets the moment the
feature flag was flipped on
desktop/src-tauri/Cargo.toml
- [target.'cfg(not(target_os = "android"))'] removed — was leaking
vpio into Windows/Linux via the catch-all.
- macOS: wzp-client with features = ["audio", "vpio"]
- Windows: wzp-client with features = ["audio"]
- Linux: wzp-client with features = ["audio"]
- Android: wzp-client with default-features = false (unchanged)
- Dropped the unused direct coreaudio-rs = "0.11" dep on macOS —
wzp-desktop's own sources never call Core Audio directly.
Verified via `cargo tree --target x86_64-pc-windows-msvc -p wzp-desktop`
that the Windows target now resolves wzp-client with cpal but without
coreaudio-rs. macOS target still resolves with coreaudio (direct via
vpio feature and transitively via cpal). macOS `cargo check` still
builds cleanly.
Cross-compile from macOS hit a cargo-xwin + llvm-lib setup issue in
ring's build.rs, so the actual `cargo check --target
x86_64-pc-windows-msvc` did not complete locally. Build verification
belongs on the user's Windows x86_64 host where MSVC is present
natively.
See tasks #23 (this one), #24 (Voice Capture DSP / WASAPI Communications
for OS-level AEC on Windows), and #25 (aarch64-pc-windows-msvc support).
56 lines
1.6 KiB
TOML
56 lines
1.6 KiB
TOML
[package]
|
|
name = "wzp-client"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
description = "WarzonePhone client library — for Android (JNI) and Windows desktop"
|
|
|
|
[dependencies]
|
|
wzp-proto = { workspace = true }
|
|
wzp-codec = { workspace = true }
|
|
wzp-fec = { workspace = true }
|
|
wzp-crypto = { workspace = true }
|
|
wzp-transport = { workspace = true }
|
|
tokio = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
bytes = { workspace = true }
|
|
anyhow = "1"
|
|
serde = { workspace = true }
|
|
serde_json = "1"
|
|
chrono = "0.4"
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
|
|
cpal = { version = "0.15", optional = true }
|
|
libc = "0.2"
|
|
|
|
# coreaudio-rs is Apple-framework-only; gate it to macOS so enabling
|
|
# the `vpio` feature from a non-macOS target builds cleanly instead of
|
|
# pulling in a crate that can only link against Apple frameworks.
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
coreaudio-rs = { version = "0.11", optional = true }
|
|
|
|
[features]
|
|
default = []
|
|
audio = ["cpal"]
|
|
# vpio enables coreaudio-rs but that dep is itself gated to macOS above,
|
|
# so enabling this feature on Windows/Linux is a no-op (the audio_vpio
|
|
# module is also #[cfg(target_os = "macos")] in lib.rs).
|
|
vpio = ["dep:coreaudio-rs"]
|
|
|
|
[[bin]]
|
|
name = "wzp-client"
|
|
path = "src/cli.rs"
|
|
|
|
[[bin]]
|
|
name = "wzp-bench"
|
|
path = "src/bench_cli.rs"
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true }
|
|
wzp-relay = { path = "../wzp-relay" }
|
|
wzp-crypto = { workspace = true }
|
|
wzp-proto = { workspace = true }
|
|
async-trait = { workspace = true }
|