6 releases

0.3.3 Feb 12, 2020
0.3.2 Jan 27, 2020
0.3.0 Dec 16, 2019
0.2.0 Dec 10, 2019
0.1.0 Dec 10, 2019

#107 in Command-line interface

Download history 8/week @ 2020-05-27 19/week @ 2020-06-03 1/week @ 2020-06-10 7/week @ 2020-06-17 1/week @ 2020-06-24 8/week @ 2020-07-01 12/week @ 2020-07-08 8/week @ 2020-07-15 7/week @ 2020-07-22 15/week @ 2020-08-05 15/week @ 2020-08-12 12/week @ 2020-08-19 12/week @ 2020-08-26 22/week @ 2020-09-02 10/week @ 2020-09-09

82 downloads per month
Used in polkahub

MIT/Apache

8KB
153 lines

circle-rs

version

Minimalistic modern infinite terminal progress indicator

This is slightly changed version of 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

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?

[dependencies]
circle-rs = {version = "*", features = ["end"]}

License: MIT OR Apache-2.0

Dependencies

~37KB