#progress-bar #progress

simple_bar

Bare minimal crate that displays a progress bar in the terminal

5 releases

0.2.2 Dec 1, 2022
0.2.1 Dec 1, 2022
0.2.0 Nov 30, 2022
0.1.6 Jul 13, 2022

#932 in Command-line interface

MIT license

11KB
192 lines

Simple Bar

crates.io

An extremely minimal terminal progress bar for Rust.

Example

use std::{thread::sleep, time::Duration};
use simple_bar::ProgressBar;

let num_iterations = 500;
let length = 100;
let eta = false
let mut bar = ProgressBar::default(num_iterations, length, eta);

for _ in 0..num_iterations {
    bar.update();
    sleep(Duration::from_millis(200));
}

This example generates the following output: above code generates


lib.rs:

simple_bar is an extremely simple terminal progress bar

Example

use std::{thread::sleep, time::Duration};
use simple_bar::ProgressBar;

let num_iterations = 500;
let mut bar = ProgressBar::default(num_iterations, 50, false);

for _ in 0..num_iterations {
    bar.update();
    sleep(Duration::from_millis(1));
}

This example generates the following output:

above code generates

No runtime deps