crates.io · crates:cfg-if
cfg-if active
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.
| Latest stable version | 1.0.5 |
|---|---|
| Published | 2026-09-16 17:36:11 UTC |
| Install | cargo add cfg-if |
| Minimum Rust version (rust-version) | Rust ≥ 1.32 |
| License | MIT OR Apache-2.0 |
| Advisories on latest version | none known |
| Last verified | 2026-10-08 19:48:42 UTC |
| Sources | api.osv.dev, crates.io |
Maintenance
| Activity | active |
|---|---|
| Last stable release | 2026-09-16 17:36:11 UTC · 22 days ago |
| Stable releases in the last 12 months | 2 |
| Published versions | 17 |
Heuristic based only on release dates; it does not measure issue or security response times.
Version history
| Version | Published |
|---|---|
1.0.5 | 2026-09-16 17:36:11 UTC |
1.0.4 | 2025-10-15 08:12:46 UTC |
1.0.3 | 2025-08-19 19:33:21 UTC |
1.0.2 withdrawn | 2025-08-19 19:09:07 UTC |
1.0.1 | 2025-06-09 21:47:16 UTC |
1.0.0 | 2020-10-06 18:44:12 UTC |
0.1.10 | 2019-09-24 15:27:21 UTC |
0.1.9 | 2019-05-15 00:43:43 UTC |
0.1.8 | 2019-05-15 00:43:20 UTC |
0.1.7 | 2019-03-04 21:18:17 UTC |
0.1.6 | 2018-10-20 02:28:41 UTC |
0.1.5 | 2018-08-13 02:04:53 UTC |
0.1.4 | 2018-06-27 15:54:57 UTC |
0.1.3 | 2018-05-03 13:50:58 UTC |
0.1.2 | 2017-07-05 14:50:25 UTC |
0.1.1 | 2017-06-08 16:18:35 UTC |
0.1.0 | 2015-07-08 01:11:24 UTC |
Showing the 17 most recent of 17 versions. JSON
Version compatibility
Newest stable version that declares support for each runtime version (from the requirements published with each version).
| Runtime | Newest compatible version |
|---|---|
rust 1.63 | 1.0.5 |
rust 1.70 | 1.0.5 |
rust 1.75 | 1.0.5 |
rust 1.80 | 1.0.5 |
rust 1.85 | 1.0.5 |
rust 1.90 | 1.0.5 |
Give your AI agent these facts
Vigia is a free MCP server: your coding agent checks versions, breaking changes and vulnerabilities before it writes code. No signup, no API key.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Add to CursorAdd to VS Code★ Star on GitHub
Any other MCP client
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Agent skill (SKILL.md): tells the agent when to use Vigia · GitHub Action for pull requests
Frequently asked questions
What is the latest version of cfg-if?
The latest stable version of cfg-if is 1.0.5, published on 2026-09-16. Verified by Vigia on 2026-10-08.
How do I install the latest version of cfg-if?
Run cargo add cfg-if. The latest stable version is 1.0.5 (verified 2026-10-08).
Is cfg-if deprecated?
No. cfg-if is not marked as deprecated in the registry.
Which Rust version does cfg-if require?
cfg-if 1.0.5 declares this requirement: Rust ≥ 1.32.
Does cfg-if 1.0.5 have known vulnerabilities?
No known advisories affect cfg-if 1.0.5 according to the data Vigia checks.
Is cfg-if still maintained?
cfg-if published 2 stable releases in the last 12 months; the most recent was 22 days ago. Activity: active.
Observed changes
No changes observed yet since Vigia started tracking this package.
Related packages
- thiserror
- regex-syntax
- memchr
- thiserror-impl
- itertools
- serde
- indexmap
- unicode-ident
- windows-sys
- rand_chacha
- base64
- itoa
Badges for your README
Show the latest version, maintenance status and deprecation status of this package. Copy the Markdown:
[](https://vigia.coredls.cloud/crates/cfg-if) [](https://vigia.coredls.cloud/crates/cfg-if) [](https://vigia.coredls.cloud/crates/cfg-if)
For agents
GET https://vigia.coredls.cloud/v1/packages/crates/cfg-if
GET https://vigia.coredls.cloud/v1/packages/crates/cfg-if/versions/{version}