fix(host): compile punktfunk-host on windows (x86_64-pc-windows-msvc)
Gate the Linux-only bits so the host crate builds on MSVC (it already built on Linux + macOS): drm_sync/dmabuf_fence use DRM ioctls + libc (a linux-only target dep) and have no non-Linux callers; VirtualOutput.remote_fd is a PipeWire concept. The full dep tree (aws-lc-rs, quinn, rusty_enet, axum) builds clean on MSVC and the binary runs (openapi emits the spec) — only these 3 cfg-gates were needed. First step of the Windows host port (docs/windows-host.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,9 @@
|
|||||||
mod audio;
|
mod audio;
|
||||||
mod capture;
|
mod capture;
|
||||||
mod discovery;
|
mod discovery;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
mod dmabuf_fence;
|
mod dmabuf_fence;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
mod drm_sync;
|
mod drm_sync;
|
||||||
mod encode;
|
mod encode;
|
||||||
mod gamestream;
|
mod gamestream;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
pub use punktfunk_core::Mode;
|
pub use punktfunk_core::Mode;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
use std::os::fd::OwnedFd;
|
use std::os::fd::OwnedFd;
|
||||||
|
|
||||||
/// A created virtual output: a PipeWire source to capture, plus an owned keepalive whose drop
|
/// A created virtual output: a PipeWire source to capture, plus an owned keepalive whose drop
|
||||||
@@ -28,6 +29,7 @@ pub struct VirtualOutput {
|
|||||||
/// Portal/remote PipeWire fd when the node lives on a sandboxed remote (e.g. Mutter's
|
/// Portal/remote PipeWire fd when the node lives on a sandboxed remote (e.g. Mutter's
|
||||||
/// RemoteDesktop+ScreenCast). `None` means the node is on the user's default PipeWire daemon
|
/// RemoteDesktop+ScreenCast). `None` means the node is on the user's default PipeWire daemon
|
||||||
/// (KWin `zkde_screencast`), captured by connecting to that daemon directly.
|
/// (KWin `zkde_screencast`), captured by connecting to that daemon directly.
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
pub remote_fd: Option<OwnedFd>,
|
pub remote_fd: Option<OwnedFd>,
|
||||||
/// `(width, height, refresh_hz)` to prefer in the PipeWire format negotiation. KWin and
|
/// `(width, height, refresh_hz)` to prefer in the PipeWire format negotiation. KWin and
|
||||||
/// gamescope outputs are created at the exact size, so this just confirms it; **Mutter sizes
|
/// gamescope outputs are created at the exact size, so this just confirms it; **Mutter sizes
|
||||||
|
|||||||
Reference in New Issue
Block a user