Crates.io | efcl |
lib.rs | efcl |
version | 0.1.3 |
source | src |
created_at | 2022-11-11 22:31:46.573181 |
updated_at | 2024-09-30 04:38:45.419288 |
description | The most simple, small, and fast terminal color text library. |
homepage | https://github.com/JakeRoggenbuck/efcl |
repository | https://github.com/JakeRoggenbuck/efcl |
max_upload_size | |
id | 713087 |
size | 6,751 |
The most simple, small, and fast terminal color text library.
efcl = "0.1.2"
use efcl::{color, Color, bold};
fn main() {
println!("Hello, {}!", color!(Color::BLUE, "world"));
println!("{}!", bold!(&color!(Color::RED, "EFCL").to_string()));
}
Here is a flamegraph of the auto-clock-speed project. In green is the time it takes for colored text to render. That is just over 9% of runtime cpu is taken by color formatting.
This is way too long for what we need it for. In auto-clock-speed, color is used sparingly and only a few default colors on top of that.
This library is for the most basic text coloring for the terminal and only includes the default terminal colors, no background color or text styles other than bold. This library is for speed.