| Crates.io | yansi |
| lib.rs | yansi |
| version | 1.0.1 |
| created_at | 2017-06-02 04:14:59.893274+00 |
| updated_at | 2024-03-13 07:48:07.624195+00 |
| description | A dead simple ANSI terminal color painting library. |
| homepage | |
| repository | https://github.com/SergioBenitez/yansi |
| max_upload_size | |
| id | 17267 |
| size | 166,597 |
In your Cargo.toml:
[dependencies]
yansi = "1.0"
In your source code:
use yansi::Paint;
println!("Testing, {}, {}, {}!",
"Ready".bold(),
"Set".black().on_yellow().invert().italic(),
"STOP".white().on_red().bright().underline().bold());
See the rustdocs for complete usage details.
Why yet another ANSI terminal coloring library? Here are some reasons:
use Paint and go!no_std, no-alloc, support with default-features = false.Style constructors are const: store styles statically, even with
dynamic conditions!Style can be predicated on arbitrary conditions.{:x} and {:08b} are supported and preserved!yansi is pretty cool 😎.yansi is licensed under either of the following, at your option: