[package] name = "robius-notification" version = "0.1.0" edition = "2021" authors = ["Project Robius Maintainers"] description = "Rust abstractions for multi-platform native notifications." documentation = "https://docs.rs/robius-notification" keywords = ["robius", "notification", "toast", "android", "dbus"] license = "MIT OR Apache-2.0" readme = "README.md" [dependencies] # Deliberately empty on Linux and every unsupported target. # # The freedesktop notification call is one D-Bus method, and the crates that # would make it are either a C library (libdbus-sys, which breaks the Android # and iOS cross-compile) or 169 crates including an async executor. src/sys/ # linux/wire.rs writes the wire format out instead. `robius-sms` deleted # polkit and gio for the same reason (its E9 note); adding a large tree back # into this crate family for one method call would reverse that decision. cfg-if = "1.0.0" [target.'cfg(target_os = "android")'.dependencies] jni = { version = "0.21.1", default-features = false } robius-android-env = "0.2.0" [target.'cfg(target_vendor = "apple")'.dependencies] block2 = "0.6.1" objc2 = "0.6.1" objc2-foundation = { version = "0.3.1", default-features = false, features = ["std", "NSString", "NSDate"] } # iOS only: macOS deliberately uses NSUserNotification instead, because # UNUserNotificationCenter raises an Objective-C exception -- which aborts -- # in a process with no app bundle. See src/sys/apple.rs. [target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dependencies] objc2-user-notifications = { version = "0.3.2", default-features = false, features = [ "std", "alloc", "block2", "UNUserNotificationCenter", "UNNotificationRequest", "UNNotificationContent", "UNNotificationTrigger", ] } [target.'cfg(target_os = "windows")'.dependencies] windows-core = { version = "0.56.0", default-features = false } windows = { version = "0.56.0", default-features = false, features = [ "Data_Xml_Dom", "UI_Notifications", "Foundation", ] }