cfg-if
A macro to ergonomically define an item depending on a large number of #[cfg] parameters. Structured like an if-else chain, the first matching branch is the item that gets emitted.
1.0.4
1.3B downloads/mo
#17 most downloaded on crates.io
rust-lang/cfg-if
What this package is like to depend on
Last release 10 months ago
15 Oct 2025
Ships unpredictably
gaps range from 2 months to 4.7 years
Rarely documented
notes for 3 of 15 stable releases
1 version withdrawn
withdrawn after publishing
11 years old
16 releases · first in 2015
1 release in the last 12 months
see the full history below
Release timeline
16 releases · Jul 2015 to Oct 2025Releases
latest 16-
1.0.415 Oct 2025Release notes
Open source →- Support
cfg(true)andcfg(false)(#99) - Set and test a MSRV of 1.32
- Have a single top-level rule
Release notes
Open source →- Support
cfg(true)andcfg(false)(#99) - Set and test a MSRV of 1.32
- Have a single top-level rule
- Support
-
1.0.319 Aug 2025 -
1.0.219 Aug 2025 withdrawn -
1.0.109 Jun 2025 -
1.0.006 Oct 2020Nothing published for this version
-
0.1.1024 Sep 2019Nothing published for this version
-
0.1.915 May 2019Nothing published for this version
-
0.1.815 May 2019Nothing published for this version
-
0.1.704 Mar 2019Nothing published for this version
-
0.1.620 Oct 2018Nothing published for this version
-
0.1.513 Aug 2018Nothing published for this version
-
0.1.427 Jun 2018Nothing published for this version
-
0.1.303 May 2018Nothing published for this version
-
0.1.205 Jul 2017Nothing published for this version
-
0.1.108 Jun 2017Nothing published for this version
-
0.1.008 Jul 2015Nothing published for this version