Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kurtlawrence/how-u-doin
Progress reporting abstraction for Rust
https://github.com/kurtlawrence/how-u-doin
Last synced: about 7 hours ago
JSON representation
Progress reporting abstraction for Rust
- Host: GitHub
- URL: https://github.com/kurtlawrence/how-u-doin
- Owner: kurtlawrence
- License: mit
- Created: 2023-01-06T05:08:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-27T00:45:38.000Z (5 months ago)
- Last Synced: 2024-12-27T02:06:54.751Z (8 days ago)
- Language: Rust
- Size: 47.9 KB
- Stars: 63
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# how-u-doin
Progress reporting abstraction for Rust
`howudoin` intends to make producing and consuming progress reports simple and ergonomic.
Importantly, it separates the progress _producers_ from the _consumer_, allowing progress reports
to be generated from disparate sections in a system.```rust
// initialise a consumer loop
howudoin::init(howudoin::consumers::Noop::default());let rpt = howudoin::new().label("Progress").set_len(10);
for _ in 0..10 {
rpt.inc(); // increment the progress
// check for cancellation
if rpt.cancelled() {
break;
}
}rpt.finish(); // finalise progress
// fetch the tree of progress
let progress = howudoin::fetch();
```Features:
- Lightweight
- Unobtrusive interface
- Nestable reports
- Automatic timers
- Message accumulation
- CancellationTake a look at the [examples](https://github.com/kdr-aus/how-u-doin/tree/main/examples) for example consumers.
- [API Docs](https://docs.rs/howudoin)
## Example terminal consumer
![term-line](https://user-images.githubusercontent.com/13831379/211681673-7e0898b7-dded-4121-8876-cf261c2a124d.gif)
## Support
Please help support this project by [sponsoring 💗](https://github.com/sponsors/kdr-aus)