6 releases (3 breaking)

0.4.1 Jun 2, 2023
0.4.0 May 18, 2023
0.3.1 Dec 9, 2022
0.2.0 Nov 11, 2022
0.1.0 Oct 20, 2022

#21 in #styling

Download history 5/week @ 2024-08-30 5/week @ 2024-09-06 2/week @ 2024-09-13 19/week @ 2024-09-20 21/week @ 2024-09-27 19/week @ 2024-10-04 18/week @ 2024-10-11 10/week @ 2024-10-18 8/week @ 2024-10-25 21/week @ 2024-11-01 11/week @ 2024-11-08 16/week @ 2024-11-15 17/week @ 2024-11-22 14/week @ 2024-11-29 39/week @ 2024-12-06 6/week @ 2024-12-13

78 downloads per month
Used in shoot

GPL-3.0-or-later

17KB
205 lines

hw-msg

hw-msg is a Rust library for the message styling I use across a lot of my Rust projects. It's purpose is so I don't have to duplicate my styling across all of my projects so that everything can be more consistent.

Build status

Crates.io Docs


lib.rs:

This crate provides macros for the style of CLI messages I like to use in my programs.

The base macros are:

  • info - Print an info-styled message
  • warning - Print a warning-styled message
  • error - Print an error-styled message
  • question - Print a question-styled message
  • debug - Print a debug-styled message

These macros will print the message without a trailing newline, like how print does. Use the *ln variants of each of these macros to get println-like functionality (i.e. infoln).

The *_fmt variants work like the base macros, but return the string instead of printing it.

Dependencies

~0.1–6MB
~35K SLoC