blargle 0.1.0

Provides debugging macros which resolves to compiler errors for release builds
Documentation
  • Coverage
  • 85.71%
    6 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 9.75 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 270.1 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • nickeldan/blargle
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • nickeldan

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 feature

If 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");

Placeholder

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
}