cfg-if

crates.io v1.0.4

12,994,215 weekly downloads · 1 Dependencies

Source data as of:

Summary

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.

Install cargo add cfg-if

Registry values

Reproduced verbatim from the official registry, with the source named on each value.

Weekly downloads 12,994,215 Source: crates.io (Rust)
Releases 16 Last release: 2025-10-15 Source: crates.io (Rust)
Dependencies 1 Source: crates.io (Rust)

Description

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.

Registry-supplied description, cleaned to plain text. Source: crates.io (Rust).

Show original (raw) description
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.

Package details

Package
cfg-if
Registry
crates.io
Version
1.0.4
Weekly downloads
12,994,215 (weekly)
Dependencies
1: rustc-std-workspace-core
Releases
16
Last release
2025-10-15
First published
2015-07-08
Repository
https://github.com/rust-lang/cfg-if

Why a field shows "—": A dash means the value is not published by the source registry for that package. Quanteta never fills in a guessed value — a missing field stays blank.

Derived indices (computation method published)

Quanteta-computed from the registry values below. This is a derived index, not a measured registry metric. See the formula on the Data & Sources page.

Q-Vitality Quanteta 55.9 / 100 Maintenance activity index (release cadence + download level).
Q-Trust Quanteta 25.0 / 100 Adoption / stability index (community size + download stability + age).
Q-Risk Quanteta 36.0 / 100 Dependency-surface index. Higher = more risk factors detected.

Data & Sources