Files
portmaster/desktop/tauri/rust-dark-light/src/platforms/mod.rs
2025-02-25 11:34:21 +02:00

49 lines
989 B
Rust

#[cfg(target_os = "macos")]
pub mod macos;
#[cfg(target_os = "macos")]
pub use macos as platform;
#[cfg(target_os = "windows")]
pub mod windows;
#[cfg(target_os = "windows")]
pub use windows as platform;
#[cfg(any(
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "netbsd",
target_os = "openbsd"
))]
pub mod freedesktop;
#[cfg(any(
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "netbsd",
target_os = "openbsd"
))]
pub use freedesktop as platform;
#[cfg(target_arch = "wasm32")]
pub mod websys;
#[cfg(target_arch = "wasm32")]
pub use websys as platform;
#[cfg(not(any(
target_os = "macos",
target_os = "windows",
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "netbsd",
target_os = "openbsd",
target_arch = "wasm32"
)))]
pub mod platform {
pub fn detect() -> crate::Mode {
super::Mode::Light
}
}