Notification System for Tauri #6604
-
Hey folks, I've searched more on the net for alternatives for an interactive notification like toast-rust(Windows 10 only) or mac-notification-sys(for MacOS) but writing 2 separate implementations for other target OS seems like a chore Are there any alternatives which provide the same or approx. same features as notify_rust but for all 3 platforms OR point me in some direction on how I would go about writing a windows/mac implementation using the target_os toggle. Thank you for reading this long question, hoping to hear from the community soon :D |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hmm, i don't know of any alternative and i would imagine that it'd be the ecosystem standard over notify_rust if it would exist. About the target_os stuff, did you see the small example in their docs? https://docs.rs/notify-rust/latest/notify_rust/index.html#toggles let mut notification = Notification::new();
#[cfg(any(target_os = "windows", target_os = "linux"))] // For functions that don't work on macos
notification.appname("");
#[cfg(target_os = "macos")] // For functions that only work on macos
notification.some_macos_specific_fn();
notification.show(); At least that's what the docs meant with the toggle. I don't think there's a better macos notification library than mac-notification-sys (which is used by notifiy_rust) yet, and i don't think the alternatives to winrt-notification (which is used by notifiy-rust) are any better either 🤔 |
Beta Was this translation helpful? Give feedback.
Hmm, i don't know of any alternative and i would imagine that it'd be the ecosystem standard over notify_rust if it would exist.
About the target_os stuff, did you see the small example in their docs? https://docs.rs/notify-rust/latest/notify_rust/index.html#toggles
Here's a small more explicit example: