Cross-compile groundwork: make the tree build for Windows (3.1)
`cargo check --target x86_64-pc-windows-gnu` is now green (only the upstream egui f32:From<f64> warnings). The Linux-only desktop deps are target-gated so the rest of the stack — which already cross-compiles — can build off Linux: - Cargo.toml: ksni and rfd's xdg-portal backend move to [target.'cfg(target_os = "linux")'.dependencies]; non-Linux gets rfd with its native Win32/AppKit backend (default features). - tray.rs: cfg-split. The ksni/SNI implementation stays Linux-only; other OSes get a no-op `start() -> None`, i.e. windowed-only (identical to the Linux no-SNI-host path). TrayEvent/TrayHandle stay cross-platform. - plex.rs: add a Windows `symlink_file` arm to make_symlink (also fixes an unused-variable warning on non-unix). The rest was already portable (disk_space/statvfs, mpv IPC UnixStream, chmod/PermissionsExt guards all cfg(unix)). macOS is Unix so those apply there unchanged. Still not a *shipped* binary: needs a real per-OS tray backend and a linking CI matrix. ROADMAP 3.1 + CLAUDE.md updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ec8cf6f934
commit
d797f2a698
6 changed files with 80 additions and 18 deletions
16
Cargo.toml
16
Cargo.toml
|
|
@ -32,12 +32,20 @@ tokio-stream = "0.1"
|
|||
tower-http = { version = "0.5", features = ["cors", "fs", "compression-gzip"] }
|
||||
argon2 = "0.5"
|
||||
rand = "0.8"
|
||||
# File-picker dialog for the desktop GUI. xdg-portal backend keeps it pure-Rust
|
||||
# (zbus, no GTK/libdbus build dep), consistent with notify-rust above.
|
||||
rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "tokio"] }
|
||||
ksni = { version = "0.3.4", features = ["tokio"] }
|
||||
libc = "0.2.186"
|
||||
|
||||
# Platform-specific desktop deps. On Linux the tray (ksni — StatusNotifierItem
|
||||
# over zbus) and the rfd file picker (xdg-portal backend) stay pure-Rust with no
|
||||
# GTK build dep, matching notify-rust. On Windows/macOS there's no SNI tray yet
|
||||
# (tray::start is a compiled-out no-op) and rfd falls back to its native backend
|
||||
# (Win32 / AppKit) via its default features.
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
ksni = { version = "0.3.4", features = ["tokio"] }
|
||||
rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "tokio"] }
|
||||
|
||||
[target.'cfg(not(target_os = "linux"))'.dependencies]
|
||||
rfd = { version = "0.15", features = ["tokio"] }
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
# Thin LTO does cross-crate inlining without the rust-lld + bundled-sqlite
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue