1 2 3 4 5 6 7 8 9 10
pub struct Platform;
impl Platform {
pub const MAC: bool = cfg!(target_os = "macos");
pub const WIN: bool = cfg!(target_os = "windows");
pub const IOS: bool = cfg!(target_os = "ios");
pub const ANDROID: bool = cfg!(target_os = "android");
pub const MOBILE: bool = Self::IOS || Self::ANDROID;
pub const DESKTOP: bool = !Self::MOBILE;
}