Packages / rupm

rs-cli-progress 0.1.0

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

Install

cargo add rs-cli-progress --registry rupm

In Ruststudio: Packages, search for rs-cli-progress, Install.

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

Versions

README

# rs-cli-progress

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

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

```rust
use rs_cli_progress::{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
```