efcl 0.1.3

The most simple, small, and fast terminal color text library.
Documentation
  • Coverage
  • 30.77%
    4 out of 13 items documented3 out of 5 items with examples
  • Size
  • Source code size: 6.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • JakeRoggenbuck/efcl
    1 0 3
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JakeRoggenbuck

Efficiency First Color Library (EFCL)

Rust Crates Version Downloads GitHub code size in bytes

The most simple, small, and fast terminal color text library.

Priorities

  • Runtime speed
  • Dependency size

Quickstart

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()));
}

Why?

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.

image

EFCL

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.

image

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.