Crates.io | blargle |
lib.rs | blargle |
version | 0.1.0 |
created_at | 2025-08-05 02:57:15.160668+00 |
updated_at | 2025-08-05 02:57:15.160668+00 |
description | Provides debugging macros which resolves to compiler errors for release builds |
homepage | |
repository | https://gitlab.com/nickeldan/blargle |
max_upload_size | |
id | 1781461 |
size | 9,750 |
The crate you never use.
Blargle provides several macros that allow for the printing of debug statements. However, this is only case when compiling for debug mode. When compiling for release mode, all of the macros generate compiler errors. The idea is that you would use these macros when trying to diagnose some problem in your code but, when it was time to build for production, the compiler errors would remind you that you had accidentally left them in.
E.g.,
blargle::println!("I've reached this point in the code");
For debug builds, this would resolve to
println!("I've reached this point in the code");
Similarly, there are macros for print
, eprintln
, eprint
, and dbg
.
log
featureIf you enable the log
feature, you will have access to wrappers around the log
crates macros. E.g.,
blargle::log_info!("Don't forget to delete this line");
There is one last macro, blargle::placeholder!()
. For debug builds, it resolves to a no op. However, it generates a compiler error for release builds. As the name suggests, this macro represents functionalitiy which you've yet to implement. E.g.,
fn validate_login(_name: &str, _password: &str) -> bool {
blargle::placeholder!();
true
}