| Crates.io | velocity |
| lib.rs | velocity |
| version | 0.1.2 |
| created_at | 2023-03-18 04:07:26.447849+00 |
| updated_at | 2023-03-18 05:35:18.008106+00 |
| description | A next level TUI Library |
| homepage | https://github.com/kawaleo/velocity |
| repository | https://github.com/kawaleo/velocity |
| max_upload_size | |
| id | 813504 |
| size | 29,034 |
Velocity is a library for creating simple yet stunning text interfaces in the terminal.
use velocity::progress::{Bar, Styles};
use velocity::colors::Paint;
fn main() {
let mut my_bar = Bar::new(Styles::Square);
my_bar.set_title("Loading cute kittens...");
my_bar.set_width(80); // 80 Percent terminal width
my_bar.start();
for i in 0..=100 {
my_bar.jump(i);
std::thread::sleep(std::time::Duration::from_millis(100));
}
my_bar.end();
println!("{}", "Kittens loaded!!!".green().bold().underline())
}