#progress-bar #bars #api

retrogress

Progress bars with a thin API around complex features

3 unstable releases

0.2.1 May 9, 2024
0.2.0 Nov 24, 2023
0.1.0 Nov 24, 2023

#2 in #bars

MIT license

9KB
142 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

~2.4–9MB
~79K SLoC