Getting Started
loaders gives you three main building blocks: ProgressBar for measured work,
Spinner for indeterminate work, and MultiProgress for several bars rendered as one
terminal block.
Add the Dependency
[dependencies]
loaders = "0.0.0"
First Progress Bar
use loaders::ProgressBar; fn main() { let pb = ProgressBar::new(3); for _ in 0..3 { pb.inc(1); } pb.finish_with_message("done"); }
First Spinner
use loaders::{Spinner, spinner::frames::DOTS}; use std::time::Duration; fn main() { let spinner = Spinner::new_with_interval(&DOTS, Duration::from_millis(80)); spinner.start_with_message("connecting"); spinner.stop_with_message("connected"); }
Iterator Usage
use loaders::ProgressIterator; fn main() { let sum: u64 = (0..100u64).progress().sum(); println!("{sum}"); }
Which Type Should I Use?
Use ProgressBar when there is a count, byte total, or step count. Use Spinner
when work is happening but a total is unknown. Use MultiProgress when multiple
threads or phases should be visible together.
Draw Targets and Hidden Bars
Progress output defaults to stderr. DrawTarget::hidden() suppresses terminal output and
is the recommended target in tests. Non-TTY streams receive newline snapshots instead of
ANSI cursor movement, which keeps pipes and logs readable. CI and NO_COLOR environments
avoid color escape sequences.