Packages / rupm

progress-tools 0.1.0

Text progress bar with percentage, rate and ETA, drawn to any writer, with an injectable clock

Install

cargo add progress-tools --registry rupm

In Ruststudio: Packages, search for progress-tools, Install.

Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-22.

Versions

README

# progress-tools

Text progress bar with percentage, rate and ETA, drawn to any writer, with an injectable clock

Add it with `rupm add progress-tools` (or `cargo add progress-tools --registry rupm`).

```rust
use progress_tools::{ManualClock, Progress};
use std::time::Duration;

let clock = ManualClock::new();
let mut p = Progress::with_clock(10, clock.clone()).width(10).label("copy");
p.set(4);
clock.advance(Duration::from_secs(8));
assert_eq!(p.render(), "copy [####------]  40% 4/10 ETA 00:12");

let mut out = Vec::new();
p.draw(&mut out).unwrap(); // writes "\r" + the line, for in-place updates in a terminal
```