☝️Send Desktop Notifications on linux and bsd
Clone or download
hoodie Merge pull request #42 from tpraxl/fix/documentation
Complement requirements documentation and examples
Latest commit 50a39d6 Aug 15, 2018



Travis license Crates.io version documentation

Shows desktop notifications. This implementation does not rely on libnotify, as it is using dbus-rs. Basic notification features are supported, more sophisticated functionality will follow. The API shown below should be stable.

notify-rust = "3"


  • rustc >= 1.18.0
  • linux, with libdbus-1
  • macos
  • no windows support

Compiletime requirements

  • libdbus-1-dev


Example 1 (Simple Notification)

extern crate notify_rust;
use notify_rust::Notification;
    .summary("Firefox News")
    .body("This will almost look like a real firefox notification.")

Example 2 (Persistent Notification)

extern crate notify_rust;
use notify_rust::Notification;
use notify_rust::NotificationHint as Hint;
    .body("This has nothing to do with emails.\nIt should not go away until you acknoledge it.")
    .hint(Hint::Resident(true)) // this is not supported by all implementations
    .timeout(0) // this however is

Usage & Documentation

Please see the documentation for current examples.

Commandline tool

Checkout toastify, it exposes most of the functionality of the lib to the commandline.

Platform support

This library shines on linux and bsd, which is it's original target platform. Lately it gained support for macOS, however this only includes a small subset of the current functionality, since NSNotifications don't have as many features. Please refer to the You are a versed macOS UI developer with mad Objective-C skillz? PRSV.