cfg
Conditional compilation is possible through two different operators:
- the
cfg
attribute:#[cfg(...)]
in attribute position - the
cfg!
macro:cfg!(...)
in boolean expressions
Both utilize identical argument syntax.
See also:
the reference, cfg!
, and macros.