#[cfg(any(target_os = "windows", target_os = "macos"))] fn main() { println!("this is an xdg only feature") } #[cfg(all(unix, not(target_os = "macos",)))] fn main() -> Result<(), Box> { use notify_rust::Notification; std::env::set_var( "RUST_LOG", "simple=trace,zbus=trace,server=trace,notify_rust=trace", ); #[cfg(feature = "env_logger")] let _ = env_logger::builder().is_test(true).try_init(); #[allow(deprecated)] Notification::at_bus("example") .summary("Critical Error") .body("Just kidding, this is just the notification (example).") .icon("dialog-error") .show()?; Ok(()) }