3 releases

0.1.2 Sep 19, 2022
0.1.1 Sep 19, 2022
0.1.0 Sep 19, 2022

#553 in Command-line interface

MIT license

64KB
759 lines

Headway - An ergonomic progress bar library

Headway is a progress bar library focused on ergonomics, just getting out of your way and letting you get back to writing all that other code.

example

Installation

# In Cargo.toml
headway = "0.1"

Usage

use headway::ProgressBarIterable;

for _ in (0..100).progress() {
    // Do important stuff here
}

Take a look at the documentation for more examples.

Advantages

Compared to other progress bar libraries, headway:

  • Allows multiple progress bars to run concurrently out of the box, even from separate threads.
  • Integrates with stdout so that printing to stdout does not mess up either your progress bars or your printed text.
  • Allows easily splitting progress bars into smaller parts (makes it easy to break up tasks over multiple threads, or into semantically separate parts).
  • Takes advantage of unicode to increment the progress bar more smoothly.
  • Works properly even if you only increment it very seldom (many libraries will show stale data if the bar is not incremented often enough).

Take a look at the documentation for more details.

Disadvantages

If you are looking for a progress bar that can be styled in a variety of ways then other libraries may be better. Headway currently does not have any support for styling progress bars.

Take a look at the documentation for some alternatives.

Contributing

Pull requests are welcome! :)

Dependencies

~235KB