Home
| Colors: |

Add A Progress Bar To A Command Line App In Rust

January 2025
```cargo
[dependencies]
indicatif = "0.17.9"
```

use indicatif::ProgressBar;
use std::{thread, time};

fn main() {
    let sleep_time = time::Duration::from_millis(10);
    let bar = ProgressBar::new(100);
    for _ in 0..100 {
        bar.inc(1);
        thread::sleep(sleep_time);
    }
    bar.finish();
}

TODO: Make a GIF showing what this does

end of line