prodash
A Rust dashboard for visualizing the progress of asynchronous and possibly blocking tasks.
Repository Health
Technical Analysis
prodash is a Rust crate for integrating progress reporting into concurrent applications and rendering that progress in various ways. It separates progress collection from display: application code writes into a non-blocking progress Tree, while pluggable renderers turn that tree into a terminal user interface, a minimal line-based display, or log output.
Built for real-world tools such as gitoxide, prodash is designed to be transparent and low-overhead so that adding progress tracking does not slow down the work being tracked. A rich set of cargo feature toggles lets you pull in only the renderers and units you need, from a full crossterm-backed TUI down to a dependency-light line renderer.
What You Get
- A non-blocking progress
Tree/RootwithProgressand traversable items for hierarchical task tracking. - A full terminal user interface renderer (
render-tui) backed by crossterm or termion. - A minimal, low-dependency line renderer (
render-line) with clicolors/no-color support and auto-configuration. - Unit formatting helpers for bytes, durations, and human-readable counts.
- Throughput tracking and a
log-based renderer for headless environments. - Fine-grained cargo feature toggles to include only the backends and units you need.
Common Use Cases
- Showing a live terminal dashboard of concurrent download or processing tasks.
- Adding a lightweight progress bar/line to a CLI without pulling in a heavy TUI stack.
- Reporting progress from a library (e.g. gitoxide) that its host applications can render however they choose.
Under The Hood
Architecture - prodash cleanly separates progress collection from rendering. The tree module (src/tree/) implements a Root/Item progress tree that application code writes into via the Progress traits in src/traits.rs; a concurrent registry (parking_lot, or optionally dashmap) holds nodes so updates are non-blocking. The render module houses independent backends — render/tui/ (a crossterm/termion TUI engine) and render/line/ (a lightweight cursor-drawing line engine) — that read the tree and draw it. unit/ and throughput.rs add formatting and rate computation.
Tech Stack - Rust 2024 edition (MSRV 1.85). Dependencies are heavily feature-gated: parking_lot/dashmap for the tree, crosstermion/tui-react/crossterm/termion for the TUI, jiff for time, bytesize/human_format for units, and async-io/futures for the async TUI loop. Benches and examples exercise the full stack.
Code Quality - The crate sets #![deny(unsafe_code, missing_docs)], enforcing documentation and forbidding unsafe. It ships a tests/ suite (nested_progress, progress, unit) plus in-module tests (src/tree/tests.rs) and benches, and maintains a detailed CHANGELOG and SECURITY policy — signs of a mature, well-maintained project used as a dependency of gitoxide.
API Design - The public API centers on the Progress trait and tree items, so instrumenting code is a matter of creating child items and calling set/inc/message. The main friction is the large feature-flag matrix: getting a working renderer requires selecting a mutually-exclusive backend, which the README documents extensively with an auto_configure helper to smooth setup.