Files
peerspeak/docs/WINDOWS.md
T
molluskandClaude Opus 4.8 46809153d8 Windows: notification chimes via SoundPlayer + docs/WINDOWS.md (W8)
Implemented by Codex (gpt-5.5); reviewed and committed by Claude.

W8 — chimes were played by shelling out to pw-play/paplay/aplay, which don't
exist on Windows, so every chime silently no-op'd there. spawn_player is now
cfg-split: Linux/unix keeps the existing player list; Windows plays the WAV via
PowerShell's System.Media.SoundPlayer (PlaySync on the existing detached thread).
Dependency-free, same fire-and-forget / silent-on-failure contract. Custom chime
paths are single-quote-escaped for the PowerShell command (helper + unit test).

Also adds docs/WINDOWS.md: a build/run/status guide (native MSVC + cross-compile
to -gnu, first-run firewall/UDP note, %APPDATA% paths, and the honest known-gaps
table — echo-cancel/screenshare/resampling/device-id/buffer-pacing).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 04:21:40 -04:00

3.0 KiB

PeerSpeak on Windows

Current status: the Windows port cross-compiles to x86_64-pc-windows-gnu and the .exe launches under Wine. A real Windows/WASAPI host is still needed for the final audio-device checks listed below.

What works today

Area Status
GUI Iced/wgpu builds and renders under Wine.
Networking Iroh QUIC transport and gossip compile on Windows.
Audio backend cpal drives WASAPI capture/playback behind AudioBackend.
Codec Opus remains 48 kHz mono, 20 ms frames.
Identity ring identity generation/load is platform-neutral.
Chimes Windows uses PowerShell System.Media.SoundPlayer for WAV playback.

Windows paths are resolved through dirs:

  • Config: %APPDATA%\peerspeak\config.json
  • Identity: %APPDATA%\peerspeak\identity.key
  • Log: %LOCALAPPDATA%\peerspeak\peerspeak.log

Building

Native Windows

Install MSVC Build Tools and CMake, then build normally:

cargo build --release

If CMake is 4.x or newer, the vendored opus/libopus build may need:

$env:CMAKE_POLICY_VERSION_MINIMUM = "3.5"
cargo build --release

Cross-compile from Linux

The current dev path cross-compiles from an Arch environment to the GNU Windows target:

rustup target add x86_64-pc-windows-gnu
sudo pacman -S mingw-w64-gcc cmake
CMAKE_POLICY_VERSION_MINIMUM=3.5 cargo build --release --target x86_64-pc-windows-gnu --bin peerspeak

Wine is useful for launch/render smoke tests, but it is not a substitute for a real Windows audio-device pass. The deeper migration plan (phases, decisions, the opus build spike) lives in the maintainer's handoff docs, outside the repo.

First run and networking

Expect a Windows Firewall prompt the first time the app opens network sockets. Allow it: PeerSpeak uses UDP for QUIC, plus relay traffic when direct NAT traversal is not available.

The default network mode keeps the n0 relay available for NAT traversal without publishing presence to n0 DNS. Direct peer-to-peer paths may work when both networks allow them; relayed connections are expected and valid.

Known gaps

Item Status
Echo cancellation Linux-only PipeWire feature. The Windows UI shows it disabled as unavailable.
Screen share Requires a Windows pixelpass.exe on PATH or a configured override.
Chimes Now routed through Windows SoundPlayer; needs a real Windows host to audibly verify.
Resampling/device format Open. Devices must support 48 kHz, and output must support stereo; a 44.1 kHz-only/default device currently errors instead of playing.
Device persistence Open. WASAPI friendly names may duplicate or change across driver/profile changes.
Playback pacing Open. The fixed playback target under WASAPI shared mode still needs real-hardware verification.

Before calling Windows support done, verify a real Windows machine can create/join a room, capture mic audio, hear remote audio, select devices, restart with selections preserved, and play notification chimes.