#[cfg(target_os = "macos")] fn get_os() -> &'static str { "macos" } #[cfg(not(target_os = "macos"))] fn get_os() -> &'static str { "unknown" } fn main() { println!("OS: {}", get_os()); }