https://github.com/olekspickle/circle-rs
Minimalistic infinite circle bar for terminal in rust.
https://github.com/olekspickle/circle-rs
Last synced: 3 months ago
JSON representation
Minimalistic infinite circle bar for terminal in rust.
- Host: GitHub
- URL: https://github.com/olekspickle/circle-rs
- Owner: olekspickle
- Created: 2019-12-09T16:16:19.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-20T20:49:52.000Z (7 months ago)
- Last Synced: 2025-03-17T19:02:34.858Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# circle-rs
[](https:://github.com/alekspickle)
## Minimalistic modern infinite terminal progress indicator
This is slightly changed version of [rustbar](https://crates.io/crates/rustbar) crate, which is simple and minimalistic,
but i needed another infinite bar animation, hence this crate.#### The goal also was to be able to use it as simple as:
## Example
```rust
use std::{io::Result, thread, time::{Duration, Instant}};
use circle_rs::{Infinite, Progress};pub fn main() -> Result<()> {
println!("\n100 ms delay");
let mut loader = Infinite::new().to_stderr();
loader.set_msg("Polling");
let start_thread = loader.start()?;
let now = Instant::now();
thread::sleep(Duration::from_secs(2));
loader.stop()?;
println!("elapsed {} {:?}",start_thread, now.elapsed());
Ok(())
}
```
## Features:
1. set custom loading message
2. set loader speed without reconstructing it
3. add cute greeny "done" message after loader is done### Note:
In (3) case you'll need to enable feature, because it requires termion to be added.
Because you **dont pay for what you dont want**, right?
```toml
[dependencies]
circle-rs = {version = "*", features = ["end"]}
```License: MIT OR Apache-2.0