#progress-bar #bars #thread #api #thin #complex #indicatif

retrogress

Progress bars with a thin API around complex features

2 unstable releases

0.2.0 Nov 24, 2023
0.1.0 Nov 24, 2023

#3 in #bars

MIT license

9KB
138 lines

Retrogress

Retrogress is a wrapper around indicatif, providing structs and traits that have a simple and limited API and that can be passed between modules and functions.

For advanced progress bar usage, in a project that does not need to share a progress bar between different sections of code, one may be better served by directly using indicatif (or any other of the many wonderful crates available). This crate can be used to construct progress bars that can be passed around, borrowed, or moved between threads.

cargo run --example sync

lib.rs:

Retrogress is a wrapper around indicatif, providing structs and traits that have a simple and limited API and that can be passed between modules and functions.

For advanced progress bar usage, in a project that does not need to share a progress bar between different sections of code, one may be better served by directly using indicatif (or any other of the many wonderful crates available). This crate can be used to construct progress bars that can be passed around, borrowed, or moved between threads.

use retrogress::Progress;
use retrogress::{ProgressBar, Sync};

let mut progress = ProgressBar::new(Sync::boxed());
let pb = progress.append("step 1");
progress.println(pb, "Write a line of text above the progress bar");
progress.println(pb, "Write another line");
progress.succeeded(pb);

Dependencies

~1.2–8.5MB
~66K SLoC