env_assert Release
Wed, Nov 25, 2020
One-minute read
I published my first semi-useful Rust crate today.
I wanted to be able to run assert
’s in release mode, but didn’t want them to be ran when I published the project (in this case, it was submitting an assignment).
So I created a library - it runs assert
’s depending on the status of an environment variable, not if it is debug/release mode.
This is a simple, single macro package that could easily be implemented, but I will use this crate for my personal projects, so I might as well make it a public crate if anyone wants to build my projects.