#macro #interface #output #terminal #styled #command #termcolor

termcolor_output

Interface crate for styled output to termcolor through macro

4 releases (1 stable)

1.0.1 Oct 23, 2019
1.0.0-rc.3 Oct 20, 2019
1.0.0-rc.2 Oct 19, 2019
1.0.0-rc.1 Oct 18, 2019

#1084 in Rust patterns

Download history 690/week @ 2024-03-14 652/week @ 2024-03-21 727/week @ 2024-03-28 637/week @ 2024-04-04 908/week @ 2024-04-11 787/week @ 2024-04-18 1131/week @ 2024-04-25 797/week @ 2024-05-02 912/week @ 2024-05-09 756/week @ 2024-05-16 690/week @ 2024-05-23 1046/week @ 2024-05-30 1168/week @ 2024-06-06 1510/week @ 2024-06-13 1381/week @ 2024-06-20 557/week @ 2024-06-27

4,896 downloads per month
Used in 20 crates (11 directly)

MIT license

11KB
96 lines

Wrapper crate for termcolor_output_impl procedural macro.

The reason for this code to be split into two crates is simple: we want to make this functionality available on stable. In fact, this dual-crate system is simply the manual implementation of the code generated by proc_macro_hack.

What is it

The termcolor crate is a cross-platform implementation for the different console APIs, abstracting away both Linux terminals and Windows consoles. It has, however, a but cumbersome API itself (only a bit though), since for formatting-heavy parts we have to litter our code with explicit styling commands. This crate allows to abstract these things away, providing the interface similar to the standard write! macro.

Dependencies

~0–8MB
~44K SLoC