Windows port Phase 0: platform-select the audio backend #2

Open
mollusk wants to merge 1 commits from windows-port-phase0 into ci-cargo-deny
Owner

Phase 0 of the Windows port: make the tree compile for Windows without touching core logic. All Linux/PipeWire assumptions are confined behind cfg gates and a single PlatformAudioBackend alias. No new dependencies (the cpal/WASAPI backend lands in Phase 1; this ships a no-op stub).

  • Cargo.toml: pipewire + rfd(xdg-portal) -> cfg(unix); cfg(windows) rfd Win32 backend
  • audio: gate pipewire_impl to unix, add cpal_impl stub, select via PlatformAudioBackend
  • core: use the alias instead of concrete PipeWireBackend
  • lib: gate the unix-only 0o600 log-mode code (+ test); Windows inherits the dir ACL
  • audio_probe: gate this PipeWire diagnostic to unix with a stub main
  • app: URL open via rundll32 (windows) / xdg-open (unix), shell-free
  • ci: .gitea/workflows/windows-build.yml (M1) - msvc build + lib tests, CMAKE_POLICY_VERSION_MINIMUM=3.5 for the vendored libopus build

Verification: Linux build/clippy/tests green (316/316). The Windows path is verified by inspection only (no local Windows toolchain), so the new CI job is the real gate. It needs a Windows act_runner (windows-latest) registered; until then it queues/skips.

Base note: targeted at ci-cargo-deny (not main) because the cargo-deny CI commit isn't in main yet, keeping this diff to just the Phase 0 work.

Co-Authored-By: Claude Opus 4.8

Generated with Claude Code

Phase 0 of the Windows port: make the tree compile for Windows without touching core logic. All Linux/PipeWire assumptions are confined behind `cfg` gates and a single `PlatformAudioBackend` alias. **No new dependencies** (the cpal/WASAPI backend lands in Phase 1; this ships a no-op stub). - Cargo.toml: `pipewire` + `rfd`(xdg-portal) -> `cfg(unix)`; `cfg(windows)` rfd Win32 backend - audio: gate `pipewire_impl` to unix, add `cpal_impl` stub, select via `PlatformAudioBackend` - core: use the alias instead of concrete `PipeWireBackend` - lib: gate the unix-only `0o600` log-mode code (+ test); Windows inherits the dir ACL - audio_probe: gate this PipeWire diagnostic to unix with a stub `main` - app: URL open via `rundll32` (windows) / `xdg-open` (unix), shell-free - ci: `.gitea/workflows/windows-build.yml` (M1) - msvc build + lib tests, `CMAKE_POLICY_VERSION_MINIMUM=3.5` for the vendored libopus build **Verification:** Linux build/clippy/tests green (316/316). The Windows path is verified by inspection only (no local Windows toolchain), so the new CI job is the real gate. **It needs a Windows act_runner (`windows-latest`) registered**; until then it queues/skips. Base note: targeted at `ci-cargo-deny` (not `main`) because the cargo-deny CI commit isn't in `main` yet, keeping this diff to just the Phase 0 work. Co-Authored-By: Claude Opus 4.8 Generated with Claude Code
mollusk added 1 commit 2026-06-18 20:55:58 +00:00
Windows port Phase 0: platform-select the audio backend
windows-build / windows-build (push) Has been cancelled
cargo-deny / cargo-deny (pull_request) Has been cancelled
windows-build / windows-build (pull_request) Has been cancelled
85b12a26c9
Make the tree compile for Windows without touching core logic, by
confining all Linux/PipeWire assumptions behind cfg gates and a single
platform-selected backend alias. No new dependencies — the cpal/WASAPI
backend lands in Phase 1; this ships a no-op stub.

- Cargo.toml: move pipewire + rfd(xdg-portal) under cfg(unix); add a
  cfg(windows) rfd using the Win32 dialog backend.
- audio: gate pipewire_impl to unix, add a cpal_impl stub for windows,
  and select between them via the new PlatformAudioBackend alias.
- core: use PlatformAudioBackend instead of the concrete PipeWireBackend.
- lib: gate the unix-only 0o600 log-file mode code (+ its test); Windows
  logs inherit the directory ACL.
- audio_probe: gate this PipeWire diagnostic to unix with a stub main.
- app: open URLs via rundll32 on windows, xdg-open on unix (shell-free).
- ci: add .gitea/workflows/windows-build.yml (M1) — build + lib tests for
  x86_64-pc-windows-msvc, with CMAKE_POLICY_VERSION_MINIMUM=3.5 for the
  vendored libopus build. Needs a windows act_runner to actually run.

Linux build/clippy/tests green (316/316). The Windows path is verified by
inspection only (no local Windows toolchain); CI is the real gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Some required checks failed
windows-build / windows-build (push) Has been cancelled
cargo-deny / cargo-deny (pull_request) Has been cancelled
windows-build / windows-build (pull_request) Has been cancelled
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin windows-port-phase0:windows-port-phase0
git checkout windows-port-phase0
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mollusk/peerspeak#2