cfg-if Alternatives

Safer and better-maintained options, ranked by Nerq Trust Score. Updated 2026-09-12.

cfg-if has a Nerq Trust Score of 63 (C+). 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.

#NameTrustGradeStarsKey Difference

FAQ

What are the best alternatives to cfg-if?

The top alternatives based on Nerq Trust Score are listed above, all independently evaluated for security and reliability.

Is it safe to switch from cfg-if?

Check each alternative's safety report by clicking its name. Trust scores above 70 indicate strong reliability.

How does Nerq rank cfg-if alternatives?

Alternatives are ranked by Trust Score v2, combining security, maintenance, documentation, and community signals.

We use cookies for analytics and caching. Privacy Policy