#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

#942 in Command-line interface

Download history 19/week @ 2024-07-23 33/week @ 2024-09-24 50/week @ 2024-10-01 4/week @ 2024-10-08

87 downloads per month

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