rbar 0.2.2

A simple, customizable loading/progress bar that gets the terminal width and automatically adjusts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use rbar;
use std::{thread, time};

// this example makes a loading bar similar to the one used by cargo
fn main() {
  for i in 0..100 {
    let bar = rbar::BarConf {
      color: rbar::str_to_color("default"),
      chars: ['[','=','>','-',']']
    };

    rbar::draw_bar(i, "Loading...", false, bar);
    thread::sleep(time::Duration::from_millis(100));
  }
}