cfg-expr
A parser and evaluator for Rust `cfg()` expressions.
0.20.9
92M downloads/mo
#848 most downloaded on crates.io
EmbarkStudios/cfg-expr
What this package is like to depend on
Last release today
22 Aug 2026
Ships on a steady schedule
a new release about every 6 weeks
Nearly every release is documented
notes for 51 of 51 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
51 releases · first in 2020
7 releases in the last 12 months
see the full history below
Release timeline
51 releases · Jan 2020 to Aug 2026Releases
latest 51-
0.20.922 Aug 2026 -
0.20.829 May 2026Release notes
Open source →Changed
- PR#89 updated the builtin target list to 1.96.0, 1.95.0 was skipped as it had zero changes to the target list.
Release notes
Open source →Changed
- PR#89 updated the builtin target list to 1.96.0, 1.95.0 was skipped as it had zero changes to the target list.
-
0.20.706 Mar 2026 -
0.20.622 Jan 2026 -
0.20.512 Dec 2025 -
0.20.431 Oct 2025 -
0.20.318 Sep 2025 -
0.20.207 Aug 2025 -
0.20.107 Jul 2025 -
0.20.016 May 2025 -
0.19.003 Apr 2025 -
0.18.020 Feb 2025 -
0.17.229 Nov 2024 -
0.17.115 Nov 2024 -
0.17.005 Sep 2024 -
0.16.029 Jul 2024Release notes
Open source →Changed
- PR#70 updated the builtin target list to 1.80.0. Thanks @sunshowers!
-
0.15.810 Apr 2024 -
0.15.709 Feb 2024 -
0.15.602 Jan 2024 -
0.15.508 Sep 2023Release notes
Open source →Changed
- PR#64 updated the builtin target list to 1.72.0. It also changed the MSRV to 1.70.0.
-
0.15.428 Jul 2023 -
0.15.319 Jun 2023Release notes
Open source →Fixed
- PR#61 fixed an issue where
target_os = "none"was not matching target triplets whereos = None. Thanks @sunshowers!
- PR#61 fixed an issue where
-
0.15.202 Jun 2023 -
0.15.120 Apr 2023 -
0.15.004 Apr 2023 -
0.14.027 Jan 2023 -
0.13.019 Dec 2022Release notes
Open source →Changed
- PR#56 updated the builtin target list to 1.66.0. Thanks @sunshowers!
-
0.12.007 Nov 2022Release notes
Open source →Changed
- PR#53 updated the builtin target list to 1.65.0. Thanks @sunshowers!
Added
- PR#54 added support for
abi, which is currently nightly only, but should have no affect on stable. Thanks @carols10cents!
-
0.11.027 Sep 2022Release notes
Open source →Changed
- PR#51 updated the builtin target list to 1.64.0. Thanks @sunshowers!
- PR#51 bumped the MSRV to 1.58.0.
-
0.10.319 May 2022Release notes
Open source →Added
- PR#49 added support for the
has_target_atomic = "<ptr | integer>"andpanic = "<strategy>"predicates. Thanks @sunshowers!
- PR#49 added support for the
-
0.10.225 Feb 2022 -
0.10.107 Feb 2022 -
0.10.004 Feb 2022Release notes
Open source →Changed
- PR#44 added support for multiple target families that are available from Rust 1.58.0+. Thanks @sunshowers!
-
0.9.101 Feb 2022Release notes
Open source →Changed
- PR#42 updated the builtin target list to 1.58.0. Thanks @sunshowers!
-
0.9.031 Aug 2021Release notes
Open source →Changed
- PR#35 changed
TargetInfo,Os,Arch,Env, andVendorto use aCow<'static, str>to avoid the need for lifetime parameters for the common case of statically known target information, but still support arbitrary/future variants. Thanks @sunshowers! - PR#38 updated the built-in target list to
1.54.0, which notably includes the addition of the newwasmvariant totarget_family. Thanks @sunshowers!
Fixed
- PR#33 added clippy.toml with an
msrvso clippy lints are consistent across environments. Thanks @remilauzier!
- PR#35 changed
-
0.8.105 Aug 2021Release notes
Open source →Changed
- PR#31 reverted the usage of "or patterns" that were only added in 1.53.0. We now state the MSRV as 1.52.0. Thanks @cgwalters!
-
0.8.016 Jul 2021Release notes
Open source →Changed
- PR#28 updated target-lexicon to 0.12. Thanks @remilauzier!
- PR#29 updated the built-in target list to 1.53.0.
-
0.7.416 Mar 2021 -
0.7.316 Mar 2021 -
0.7.216 Mar 2021 -
0.7.117 Feb 2021Release notes
Open source →Fixed
- Fixed support for the
uclibceabienvironment added for one target in rust 1.50.0.
- Fixed support for the
-
0.7.012 Feb 2021Release notes
Open source →Changed
- Updated the builtin target list to Rust 1.50.0. Again, somewhat of a breaking change as many targets were removed or changed.
Fixed
- Update smallvec to fix an advisory
-
0.6.004 Jan 2021Release notes
Open source →Changed
- Updated the builtin target list to Rust 1.49.0, this is somewhat of a breaking change, as rustc now considers all
androidtargets to have thegnuenvironment, where previously, it was unspecified.
- Updated the builtin target list to Rust 1.49.0, this is somewhat of a breaking change, as rustc now considers all
-
0.5.115 Dec 2020 -
0.5.020 Oct 2020 -
0.4.104 Jun 2020 -
0.4.004 Jun 2020Release notes
Open source →Added
- PR#9 added the optional
targetsfeature, which allows matching the varioustarget_predicates against atarget_lexicon::Triple.
Changed
- PR#9 changed the
Arch,Vendor,Os, andEnvtypes to not be longer enums, and are instead thin wrappers around strings. This allows for custom targets where one or more components of the target triple are not built-in to rustc. Resolved #8. - Changed
ParseErrorto remove the lifetime and just keep an owned string of the expression that failed to parse. - Updated the list of built-in rustc targets to 1.43.1.
- PR#9 added the optional
-
0.3.005 Apr 2020Release notes
Open source →Changed
- PR#7 changed
Expression::evalto take aLogictrait, to enable evaluation of 'unknown' predicates. Thanks @sunshowers!
- PR#7 changed
-
0.2.130 Mar 2020 -
0.2.005 Feb 2020Release notes
Open source →Added
- Added
targets::rustc_versionwhich can be used to retrieve the version string of the rustc used to generate the list of targets.
Changed
targets::ALLnow uses the built-in targets for rustc 1.41.0
- Added
-
0.1.009 Jan 2020Release notes
Open source →Added
- Initial add of all the things
<!-- next-url --> [Unreleased]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.9...HEAD [0.20.9]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.8...0.20.9 [0.20.8]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.7...0.20.8 [0.20.7]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.6...0.20.7 [0.20.6]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.5...0.20.6 [0.20.5]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.4...0.20.5 [0.20.4]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.3...0.20.4 [0.20.3]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.2...0.20.3 [0.20.2]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.1...0.20.2 [0.20.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.20.0...0.20.1 [0.20.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.19.0...0.20.0 [0.19.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.18.0...0.19.0 [0.18.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.17.2...0.18.0 [0.17.2]: https://github.com/EmbarkStudios/cfg-expr/compare/0.17.1...0.17.2 [0.17.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.17.0...0.17.1 [0.17.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.16.0...0.17.0 [0.16.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.8...0.16.0 [0.15.8]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.7...0.15.8 [0.15.7]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.6...0.15.7 [0.15.6]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.5...0.15.6 [0.15.5]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.4...0.15.5 [0.15.4]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.3...0.15.4 [0.15.3]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.2...0.15.3 [0.15.2]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.1...0.15.2 [0.15.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.15.0...0.15.1 [0.15.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.14.0...0.15.0 [0.14.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.13.0...0.14.0 [0.13.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.12.0...0.13.0 [0.12.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.11.0...0.12.0 [0.11.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.10.3...0.11.0 [0.10.3]: https://github.com/EmbarkStudios/cfg-expr/compare/0.10.2...0.10.3 [0.10.2]: https://github.com/EmbarkStudios/cfg-expr/compare/0.10.1...0.10.2 [0.10.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.10.0...0.10.1 [0.10.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.9.1...0.10.0 [0.9.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.9.0...0.9.1 [0.9.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.8.1...0.9.0 [0.8.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.8.0...0.8.1 [0.8.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.7.4...0.8.0 [0.7.4]: https://github.com/EmbarkStudios/cfg-expr/compare/0.7.3...0.7.4 [0.7.3]: https://github.com/EmbarkStudios/cfg-expr/compare/0.7.2...0.7.3 [0.7.2]: https://github.com/EmbarkStudios/cfg-expr/compare/0.7.1...0.7.2 [0.7.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.7.0...0.7.1 [0.7.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.6.0...0.7.0 [0.6.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.5.1...0.6.0 [0.5.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.5.0...0.5.1 [0.5.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.4.1...0.5.0 [0.4.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.4.0...0.4.1 [0.4.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.3.0...0.4.0 [0.3.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.2.1...0.3.0 [0.2.1]: https://github.com/EmbarkStudios/cfg-expr/compare/0.2.0...0.2.1 [0.2.0]: https://github.com/EmbarkStudios/cfg-expr/compare/0.1.0...0.2.0 [0.1.0]: https://github.com/EmbarkStudios/cfg-expr/releases/tag/0.1.0