mirror of
https://github.com/warpdotdev/warp.git
synced 2026-06-08 07:44:48 +08:00
Most `target_os = "linux"` cfg sites in this tree gate code that already works fine on FreeBSD. wayland-client, cctk, fontconfig, x11rb, native-dialog, notify-rust, and the WindowingSystem enum all compile and run there using the existing Linux branches. Widening those cfg guards from `target_os = "linux"` to `any(target_os = "linux", target_os = "freebsd")` is enough to get a working build. The change is mechanical: 79 files across `app/` and `crates/`, all of them just adjusting the cfg. One Linux-only carveout: `InputFlags::IUTF8` in `app/src/terminal/local_tty/unix.rs`. nix does not expose that termios input flag on FreeBSD, and the PTY works without it. Linux, macOS, and Windows are unaffected by construction: every widened cfg already evaluated true on Linux and continues to; neither macOS nor Windows ever matched these guards. Tested by building `warp-oss` on FreeBSD 16-CURRENT amd64 with rust 1.92 and launching it under wayland (niri). <img width="2560" height="1440" alt="image" src="https://github.com/user-attachments/assets/085f3b8c-621c-4fbb-adc8-69daebc03d3a" />
10 lines
229 B
Rust
10 lines
229 B
Rust
use cfg_aliases::cfg_aliases;
|
|
|
|
fn main() {
|
|
cfg_aliases! {
|
|
macos: { target_os = "macos" },
|
|
linux: { any(target_os = "linux", target_os = "freebsd") },
|
|
noop: { not(any(macos, linux, windows)) },
|
|
}
|
|
}
|