#cargo-build #output #alert #compilation #message #display #during

macro no-std build build-alert

Display a message in the Cargo build output during compilation

7 releases

0.1.6 Jan 2, 2024
0.1.5 Dec 25, 2023
0.1.4 Jul 15, 2023
0.1.1 Mar 27, 2023

#377 in Build Utils

Download history 234/week @ 2023-12-22 476/week @ 2023-12-29 161/week @ 2024-01-05 148/week @ 2024-01-12 129/week @ 2024-01-19 151/week @ 2024-01-26 156/week @ 2024-02-02 173/week @ 2024-02-09 257/week @ 2024-02-16 272/week @ 2024-02-23 210/week @ 2024-03-01 602/week @ 2024-03-08 438/week @ 2024-03-15 484/week @ 2024-03-22 640/week @ 2024-03-29 596/week @ 2024-04-05

2,192 downloads per month
Used in 10 crates (8 directly)

MIT/Apache

9KB
74 lines

build-alert

github crates.io docs.rs build status

Display a message in the Cargo build output during compilation.

[dependencies]
build-alert = "0.1"

Example

#[cfg(debug_assertions)]
build_alert::yellow! {"
NOTE:  use --release
  Syn's test suite has some tests that run on every source file
  and test case in the rust-lang/rust repo, which can be pretty
  slow in debug mode. Consider running cargo test with `--release`
  to speed things up.
"}

#[cfg(not(feature = "all-features"))]
build_alert::red! {"
ERROR:  use --all-features
  Syn's test suite normally only works with all-features enabled.
  Run again with `--all-features`, or run with `--features test`
  to bypass this check.
"}

screenshot


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

Dependencies

~0.4–1MB
~20K SLoC