#led #blink #light #execution #notify #notifier #error


Allows to visualize the execution and result of code using LED light blink(1)

3 releases

0.1.2 Sep 14, 2023
0.1.1 Feb 16, 2021
0.1.0 Oct 24, 2020

#84 in Visualization

Download history 3/week @ 2024-02-21 12/week @ 2024-02-28 16/week @ 2024-03-27 35/week @ 2024-04-03 23/week @ 2024-04-10

83 downloads per month
Used in cargo-blinc


445 lines


LED notifications made easy

CI status badge Crates.io version Code coverage License

About | Demo | Installation | License | Contribution

Built with 🦀


This library allows you control the state of code execution using blink(1) LED notifier.

You simply wrap the code you want to track with transition library:

use std::error::Error;
use std::thread;
use std::time::Duration;
use transition::Transition;

fn main() -> Result<(), Box<dyn Error>> {
    // start transition
    let notification = Transition::default().start()?;

    // our example code

    // task finished with success


What does it do?

  1. After calling start(), blink(1) starts blinking with blue light. This is done in a separate thread.
  2. Then our code is executing.
  3. At the end we call notification.notify_success() (or notification.notify_failure()) which changes the color of LED to green (or red).

Supported colors:

use transition::Led;

let color = Led::Blue;
match color {
  Led::Red => println!("red"),
  Led::Green => println!("green"),
  Led::Blue => println!("blue"),
  Led::Yellow => println!("yellow"),
  Led::Orange => println!("orange"),
  Led::Pink => println!("pink"),
  Led::Cyan => println!("cyan"),
  Led::White => println!("white"),
  Led::Blank => println!("turn off the led"),

See examples for more


Demo GIF


Add as a dependency to your Cargo.toml:

transition = "0.1.1"

One of the dependency requires libusb-1.0 to be installed. On Linux you can install it by running:

sudo apt install libusb-1.0

Make sure that you have correct access rights to access blink(1) device. See udev rules here.


This project is licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.