mimir_progress

Crates.iomimir_progress
lib.rsmimir_progress
version0.1.0
created_at2025-12-16 15:17:24.206324+00
updated_at2025-12-16 15:17:24.206324+00
descriptionA terminal progress bar with highly configurable intervals.
homepage
repository
max_upload_size
id1988044
size25,358
Michael Clayton (mwcz)

documentation

README

mimir_progress

A terminal progress bar library for Rust.

Features

  • Configurable update intervals: time-based, count-based, or percentage-based
    • For instance, in CI/CD an update could be issued every 1000ms to avoid spamming the logs, or every 30ms for rapid updates in an interactive environment
  • Displays elapsed time, estimated remaining time, and processing rate
  • Optional same-line rendering (can be disabled for CI environments)
  • Customizable message prefix

Usage

use mimir_progress::{Progress, ProgressInterval};
use std::time::Duration;

// Update every 2 seconds
let mut pb = Progress::new(1000, ProgressInterval::Time(Duration::from_secs(2)));

// Or update every 100 items
let mut pb = Progress::new(1000, ProgressInterval::Count(100));

// Or update every 10%
let mut pb = Progress::new(1000, ProgressInterval::Percent(10));

pb.set_prefix("Processing: ".to_string());

for _ in 0..1000 {
    // do work
    pb.inc();
}

Dependencies

  • humantime - Duration formatting
  • termion - Terminal control sequences
Commit count: 0

cargo fmt