#macro #helper #docs #information #style #text #bunt

macro bunt-macros

Helper crate for bunt. Please see the docs of bunt for more information. Do not use this crate directly, API stability is not guaranteed!

7 releases

0.2.8 Jan 29, 2023
0.2.5 Jun 9, 2021
0.2.4 Nov 19, 2020
0.2.3 Oct 3, 2020
0.1.0 Jul 30, 2020

#1996 in Procedural macros

Download history 1105/week @ 2024-03-14 1781/week @ 2024-03-21 453/week @ 2024-03-28 306/week @ 2024-04-04 374/week @ 2024-04-11 339/week @ 2024-04-18 361/week @ 2024-04-25 305/week @ 2024-05-02 300/week @ 2024-05-09 372/week @ 2024-05-16 414/week @ 2024-05-23 350/week @ 2024-05-30 299/week @ 2024-06-06 305/week @ 2024-06-13 356/week @ 2024-06-20 231/week @ 2024-06-27

1,240 downloads per month
Used in 27 crates (via bunt)

MIT/Apache

54KB
1K SLoC

Bunt: simple macro-based terminal colors and styles

CI status of master Crates.io Version docs.rs

bunt offers macros to easily print colored and formatted text to a terminal. It is just a convenience API on top of termcolor. bunt is implemented using procedural macros, but it does not depend on syn and compiles fairly quickly.

Minimum Supported Rust Version: 1.46.0

// Style tags will color/format text between the tags.
bunt::println!("I really like {$yellow}lemons{/$}! Like, {$blue+italic}a lot{/$}.");

// To style a single argument, you can also use the `{[style]...}` syntax. This
// can be combined with style tags.
let v = vec![1, 2, 3];
bunt::println!("Here is some data: {[green]:?}. {$bold}Length: {[cyan]}{/$}", v, v.len());

See the documentation for more information.

Status of this project

This is still a young project, but I already use it in two applications of mine. The syntax is certainly not final yet. Seeking feedback from the community!



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 this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

These are the docs for the crate bunt-macros. This is just implementation detail, please see the crate bunt for the real docs.

Dependencies

~310KB