# Conditional compilation for debug/release

**URL:** <https://users.rust-lang.org/t/conditional-compilation-for-debug-release/1098>\
**Category:** uncategorized\
**Created:** [April 23, 2015, 5:57am UTC](https://users.rust-lang.org/t/conditional-compilation-for-debug-release/1098 "2015-04-23T05:57:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stebalien](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/stebalien/32/34_2.png) [@stebalien](https://users.rust-lang.org/u/stebalien)\
**Post date:** [April 24, 2015, 12:32pm UTC](https://users.rust-lang.org/t/conditional-compilation-for-debug-release/1098/3 "2015-04-24T12:32:59Z")

</div>

You can use `cfg(debug_assertions)` but there should probably be a `cfg(debug)`.

---

_[View the full topic](https://users.rust-lang.org/t/conditional-compilation-for-debug-release/1098)._
