Expand description
A minimal, zero-dependency terminal progress bar for Rust CLI applications.
§Quick Start
use nanoprogress::ProgressBar;
use std::thread;
use std::time::Duration;
let bar = ProgressBar::new(100)
.message("Downloading...")
.start();
for _ in 0..100 {
thread::sleep(Duration::from_millis(30));
bar.tick(1);
}
bar.success("Download complete");§Features
- Zero external dependencies
- Thread-safe (
Send + Sync) — clone and share across threads - Automatic TTY detection — ANSI codes are skipped when output is piped
- Customizable bar width, fill/empty characters, and messages
- Clean finalization with colored
✔/✖symbols - Automatic cleanup via
Drop
Structs§
- Progress
Bar - A thread-safe terminal progress bar.
- Progress
BarBuilder - Builder for configuring and starting a
ProgressBar.