ansi-colors-macro

Crates.ioansi-colors-macro
lib.rsansi-colors-macro
version0.1.2
sourcesrc
created_at2021-03-11 03:12:54.707634
updated_at2021-03-11 17:55:01.144872
descriptionA proc-macro for creating ANSI colored strings at compile time
homepage
repositoryhttps://github.com/SirWindfield/ansi-colors-macro-rs
max_upload_size
id367066
size22,020
mainrs (mainrs)

documentation

README

ansi-colors-macro

A proc-macro for creating colored ANSI strings at compile-time.

Usage

use ansi_colors_macro::ansi_string;

const DONE_MSG: &str = ansi_string!("{green Done}");

Shortcomings

  • Supports foreground colors only. The syntax has to be expanded for background colors and styling as well. PRs welcome. Please open an issue so we can exchange ideas beforehand!

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Commit count: 6

cargo fmt