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.5Latest, 16 Sep 2026
513MDownloads, last 90 days
0Advisories on the latest
0Advisories, all versions
MIT OR Apache-2.0Licence
646Stars
3.9/10OpenSSF Scorecard

In the news

Sources: crates.io, deps.dev (CC BY 4.0), OSV. Last checked 3 Dec 2026.