tiny_update_notifier 1.1.0

Tiny update notifier utility for rust cli programs
Documentation

Checks for update on program launch if more than 24h have passed since the last check, then pops up a notification if a new version was found 📢

App Screenshot

Installation

Install tiny_update_notifier using Cargo

  cd my-project
  cargo add tiny_update_notifier

Usage

tiny_update_notifier::Notifier::new().run(pkg_version, pkg_name, pkg_repo_url)

Examples

// Spawns a thread to check for updates and notify user if there is a new version available.
use tiny_update_notifier::run_notifier;

fn main() {
    run_notifier(
        env!("CARGO_PKG_VERSION"),
        env!("CARGO_PKG_NAME"),
        env!("CARGO_PKG_REPOSITORY"),
    );
}
// equivalent to the code above
use std::thread;
use tiny_update_notifier::Notifier;

fn main() {
    thread::spawn(|| {
        Notifier::new(
            env!("CARGO_PKG_VERSION"),
            env!("CARGO_PKG_NAME"),
            env!("CARGO_PKG_REPOSITORY"),
        )
        .run();
    });
}

Used by https://github.com/Araxeus/ls-interactive/