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

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

#1750 in Rust patterns

Download history 955/week @ 2024-07-20 2185/week @ 2024-07-27 1051/week @ 2024-08-03 625/week @ 2024-08-10 706/week @ 2024-08-17 1367/week @ 2024-08-24 600/week @ 2024-08-31 963/week @ 2024-09-07 687/week @ 2024-09-14 1575/week @ 2024-09-21 1037/week @ 2024-09-28 907/week @ 2024-10-05 843/week @ 2024-10-12 427/week @ 2024-10-19 1041/week @ 2024-10-26 1225/week @ 2024-11-02

3,611 downloads per month
Used in 19 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–6.5MB
~37K SLoC