Skip to content
Cargo

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.

github.com/rust-lang/cfg-ifMITrust-lang-owner, Alex Crichton32.1M / week646 · 51 forks · 22 contributors
Compare
Compares against 1.0.5 (latest stable)
Latest Stable1.0.5Sep 16, 2026
Release cadenceEvery 2 months
Last releaseSep 16, 2026
Open advisories0
Changelog quality100% curated
GitHub Releases + CHANGELOG
Security
1.x
STABLE · RCPRE-RELEASEOct2024AprJulOct2025AprJulOct2026AprJul

12 older or filtered releases not shown.

Breaking changes and a migration checklist for each major version