target-spec
Evaluate Cargo.toml target specifications
3.6.0
15M downloads/mo
#2434 most downloaded on crates.io
guppy-rs/guppy
What this package is like to depend on
Last release 4 months ago
01 Apr 2026
Release timing varies
gaps range from 2 weeks to 5 months
Nearly every release is documented
notes for 45 of 46 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
47 releases · first in 2020
8 releases in the last 12 months
see the full history below
Release timeline
47 releases · Mar 2020 to Apr 2026Releases
latest 47-
3.6.001 Apr 2026Release notes
Open source →Added
- Support for parsing
rustc --print=cfgoutput, under a newcustom-cfgfeature. (The existingcustomfeature now implicitly includescustom-cfg.)
Changed
CustomTripleCreateError::Unavailableis now deprecated, and replaced withCustomJsonUnavailable/CustomCfgUnavailable.
Other improvements
- The crates.io config for target-spec now enforces GitHub Trusted Publishing.
Release notes
Open source →Added
- Support for parsing
rustc --print=cfgoutput, under a newcustom-cfgfeature. (The existingcustomfeature now implicitly includescustom-cfg.)
Changed
CustomTripleCreateError::Unavailableis now deprecated, and replaced withCustomJsonUnavailable/CustomCfgUnavailable.
Other improvements
- The crates.io config for target-spec now enforces GitHub Trusted Publishing.
- Support for parsing
-
3.5.731 Jan 2026Release notes
Open source →Changed
- Updated
cfg-exprto version 0.20.6, updating builtin targets to Rust 1.93.
Release notes
Open source →Changed
- Updated
cfg-exprto version 0.20.6, updating builtin targets to Rust 1.93.
- Updated
-
3.5.612 Jan 2026Release notes
Open source →Fixed
- In custom targets, support arbitrary strings such as
"immediate-abort"forpanic-strategy.
Release notes
Open source →Fixed
- In custom targets, support arbitrary strings such as
"immediate-abort"forpanic-strategy.
- In custom targets, support arbitrary strings such as
-
3.5.527 Dec 2025Release notes
Open source →Changed
- Updated
cfg-exprto version 0.20.5, updating builtin targets to Rust 1.92.
Release notes
Open source →Changed
- Updated
cfg-exprto version 0.20.5, updating builtin targets to Rust 1.92.
- Updated
-
3.5.413 Oct 2025Release notes
Open source →Fixed
- For custom targets, updated the deserializer to handle
target-pointer-widthbecoming an integer in the newest Rust nightlies.
- For custom targets, updated the deserializer to handle
-
3.5.312 Oct 2025Release notes
Open source →Changed
- Updated
cfg-exprto version 0.20.3, updating builtin targets to Rust 1.90.
- Updated
-
3.5.229 Sep 2025Release notes
Open source →Fixed
Replaced obsolete
doc_auto_cfgwithdoc_cfg, to fix Rust nightly builds with thedoc_cfgflag enabled. -
3.5.115 Sep 2025Release notes
Open source →Changed
- Updated
cfg-exprto version 0.20.2, updating builtin targets to Rust 1.89.
- Updated
-
3.5.011 Jul 2025Release notes
Open source →Changed
- Internal dependency
cfg-exprupdated to 0.20.2, updating builtin targets to Rust 1.88. - MSRV updated to Rust 1.86, as required by dependencies. (Apologies for not fulfilling the 6 month support promise for this version series.)
- Internal dependency
-
3.4.221 Feb 2025Release notes
Open source →Changed
Internal dependency
cfg-exprupdated to 0.18.0, updating builtin targets to Rust 1.85. -
3.4.115 Feb 2025Release notes
Open source →Fixed
- Removed unused direct dependency on unicode-ident. Thanks hanna-kruppe for your contribution!
-
3.4.009 Feb 2025Release notes
Open source →Added
- Added
Triple::from_rustc_version_verboseandPlatform::from_rustc_version_verboseto parserustc -vVoutput and obtain a triple.
Changed
- Renamed
Platform::currenttoPlatform::build_targetto indicate that it is determined at build time, not at runtime. The old method is still available but has been marked deprecated.
- Added
-
3.3.124 Dec 2024Release notes
Open source →Changed
- Improved error message for
CustomTripleCreateError::Unavailable.
- Improved error message for
-
3.3.023 Dec 2024Release notes
Open source →Added
CustomTripleCreateErrornow hasinput,input_string,line_and_column, andlabelmethods. These methods aid in implementingtarget-spec-miette, and also allow dependencies to be oblivious to whether thecustomfeature is enabled.
Fixed
- Custom platforms now deserialize the
target-familyandtarget-endianfields correctly. Previously, these fields were ignored and always treated as empty.
Deprecated
Error::CustomTripleCreateis now deprecated. This error was never actually created, and will be removed in the future.CustomTripleCreateError::Deserializeis now deprecated. target-spec now creates a differentDeserializeJsonvariant when deserialization fails. This variant also contains the original input being deserialized.
Changed
- MSRV updated to Rust 1.82.
- Internal dependency
cfg-exprupdated to 0.17.2, updating builtin targets to Rust 1.83.
-
3.2.211 Sep 2024Release notes
Open source →Changed
- Internal dependency
cfg-exprupdated to 0.17.0, updating builtin targets to Rust 1.81.
- Internal dependency
-
3.2.131 Jul 2024Release notes
Open source →Fixed
- Update minimum version of
target-lexicondependency to 0.12.16, to ensure that minimal-version builds work.
- Update minimum version of
-
3.2.029 Jul 2024Release notes
Open source →Changed
- MSRV updated to Rust 1.75.
- Internal dependency
cfg-exprupdated to 0.16.0, updating builtin targets to Rust 1.80.
-
3.1.004 Feb 2024Release notes
Open source →Changed
- MSRV updated to Rust 1.73.
- Internal dependency
cfg-exprupdated to 0.15.6, updating builtin targets to Rust 1.75.
-
3.0.129 Jul 2023Release notes
Open source →Changed
- Internal dependency
cfg-exprupdated to 0.15.4, updating builtin targets to Rust 1.71.
- Internal dependency
-
3.0.026 Jun 2023Release notes
Open source →Changed
TargetSpecnow stores plain strings rather than parsed triples. This matches what Cargo does.TargetExpressionhas been renamed renamed toTargetSpecExpression.Error::UnknownTargetTriplehas been renamed toError::InvalidTargetSpecString, and returns a newPlainStringParseErrortype.
Added
TargetSpec,TargetSpecExpressionandTargetSpecPlainStringnow implementstd::fmt::Display.
-
2.0.119 Jun 2023Release notes
Open source →Fixed
Triple'sEq,PartialEq,Ord,PartialOrdandHashnow take into account custom platforms.
-
2.0.019 Jun 2023Release notes
Open source →Added
Custom platforms
Added support for custom triples and platforms via JSON specifications:
- Added support for custom triples and platforms, under the optional
customfeature. - New methods on
PlatformandTriple:is_standard: returns true if this is a standard platform (builtin or heuristic).is_custom: returns true if this is a custom platform.is_builtin: returns true if this is a builtin platform.is_heuristic: returns true if this platform was determined heuristically.
Other additions
- Added
new_strictmethods toPlatformandTriple, to disable heuristic target parsing.
Fixed
target_os = "none"is now correctly handled.
Changed
- Internal dependency
cfg-exprupdated to 0.15.3, updating builtin targets to Rust 1.70. PlatformSummaryis now non-exhaustive.PlatformSummary::newnow creates a newPlatformSummaryfrom a triple string. (The oldPlatformSummary::newhas been renamed toPlatformSummary::from_platform).
Removed
- Removed deprecated
Error::UnknownPredicatevariant. Errorno longer implementsEqorPartialEqdue to one of its variants now containingserde_json::Error.
- Added support for custom triples and platforms, under the optional
-
1.4.015 Apr 2023Release notes
Open source →Changed
- Internal dependency
cfg-exprupdated to 0.15.0, updating builtin targets to Rust 1.68. - MSRV updated to Rust 1.66.
- Internal dependency
-
1.3.108 Jan 2023 -
1.3.008 Jan 2023Release notes
Open source →Changed
- Internal dependency
cfg-exprupdated to 0.13.0, updating builtin targets to Rust 1.66. - MSRV updated to Rust 1.62.
- Internal dependency
-
1.2.207 Nov 2022Release notes
Open source →Updated
Internal dependency
cfg-exprupdated to 0.12.0, enabling parsing oftarget_abi. -
1.2.125 Oct 2022Release notes
Open source →Added
ExpressionParseErrornow carries information about the reason a target expression couldn't be parsed. This has been done to support pretty-printing via the new target-spec-miette crate.
-
1.2.030 Sep 2022Release notes
Open source →Changed
- Repository location update.
- Internal dependency updates.
- MSRV updated to Rust 1.58.
Thanks to Carol Nichols for her contributions to this release!
-
1.1.031 Aug 2022Release notes
Open source →Fixed
- Unknown predicates now evaluate to false, matching Cargo's behavior.
- As a result,
Error::UnknownPredicateis no longer in use and has been deprecated.
- As a result,
- Unknown predicates now evaluate to false, matching Cargo's behavior.
-
1.0.229 May 2022 -
1.0.107 Feb 2022 -
1.0.007 Feb 2022Release notes
Open source →No breaking changes in this release compared to version 0.9.
Changed
- Internal dependency version bump:
cfg-exprupdated to 0.10.0.
[0.9.0] - 2021-10-01
- Internal dependency version bump:
-
0.9.001 Oct 2021Nothing published for this version
-
0.8.014 Sep 2021Release notes
Open source →Added
Triplerepresents a target triple, uniquely identified by a triple string.TargetExpressionrepresents a target expression beginning withcfg(.
Changed
target-specnow usestarget-lexiconto parse triples, while continuing to usecfg-exprfor expressions and evaluation.- Updated supported builtin targets to Rust 1.55.
target-specis now more forward compatible, since new targets in future versions of Rust can be supported with non-breaking updates totarget-lexicon.
TargetSpecis now an enum withTripleandTargetExpressionvariants.Platformno longer has a lifetime parameter.- Updated supported builtin targets to Rust 1.55.
cfg-expris now a private dependency again (target-lexiconis also a private dependency).- MSRV updated to Rust 1.51.
-
0.7.024 Feb 2021Release notes
Open source →Changed
- Public dependency version bumps:
cfg-exprupdated to 0.7.1.proptestupdated to version 1 and the corresponding feature renamed toproptest1.
- Public dependency version bumps:
-
0.6.114 Feb 2021Release notes
Open source →Changed
cfg-exprversion requirement relaxed: 0.6 through 0.7 are now supported. There are no API changes between the two versions.
-
0.6.004 Feb 2021Release notes
Open source →Added
Platformnow implementsHash + Eq + Ord.
Changed
TargetFeaturesandPlatform::add_flagsnow acceptCow<'static, str>, simplifying lifetime management in many cases.cfg-exprupdated to 0.6.0.
-
0.5.002 Dec 2020 -
0.4.129 Aug 2020 -
0.4.020 Jun 2020Release notes
Open source →Added
- New, optional feature
summariesto provide serialization and deserialization forPlatformandTargetFeatures. Platform::is_customreturns true if the platform was created with thecustomconstructor.
Changed
- The error types have been unified into a single
Errortype. Platform::newandPlatform::currentnow return errors instead ofNone.
- New, optional feature
-
0.3.013 Jun 2020Release notes
Open source →Added
Platform::customcreates platforms that are unknown to rustc.- This is supported through
cfg-expr, which is now a public dependency. - Custom platforms are often found in embedded Rust.
- This is supported through
Changed
- In order to support custom platforms,
Platform::triplenow returns a&'a strinstead of a&'static str.
-
0.2.407 May 2020Release notes
Open source →Added
- New feature
proptest010to generate random platforms for property testing.
- New feature
-
0.2.315 Apr 2020Release notes
Open source →Fixed
- Better handling of unknown flags.
- Unknown flags now evaluate to false instead of erroring out.
- Added
Platform::add_flagsto allow setting flags that evaluate to true.
These changes were prompted by how
cargo-websets thecargo_webflag to true forcargo web build. - Better handling of unknown flags.
-
0.2.215 Apr 2020 withdrawn -
0.2.107 Apr 2020 -
0.2.005 Apr 2020Release notes
Open source →Added
- Added support for parsing specs and platforms separately from evaluating them, making error-less evaluation possible.
- Added support for target features, including situations when target features are unknown.
Changed
- Switched to
cfg-expras the backend forcfg()expressions.
-
0.1.021 Mar 2020Release notes
Open source →- Initial release.
<!-- next-url --> [3.6.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.6.0 [3.5.7]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.5.7 [3.5.6]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.5.6 [3.5.5]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.5.5 [3.5.4]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.5.4 [3.5.3]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.5.3 [3.5.2]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.5.2 [3.5.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.5.1 [3.5.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.5.0 [3.4.2]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.4.2 [3.4.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.4.1 [3.4.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.4.0 [3.3.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.3.1 [3.3.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.3.0 [3.2.2]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.2.2 [3.2.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.2.1 [3.2.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.2.0 [3.1.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.1.0 [3.0.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.0.1 [3.0.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-3.0.0 [2.0.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-2.0.1 [2.0.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-2.0.0 [1.4.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.4.0 [1.3.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.3.1 [1.3.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.3.0 [1.2.2]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.2.2 [1.2.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.2.1 [1.2.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.2.0 [1.1.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.1.0 [1.0.2]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.0.2 [1.0.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.0.1 [1.0.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-1.0.0 [0.9.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.9.0 [0.8.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.8.0 [0.7.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.7.0 [0.6.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.6.1 [0.6.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.6.0 [0.5.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.5.0 [0.4.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.4.1 [0.4.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.4.0 [0.3.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.3.0 [0.2.4]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.2.4 [0.2.3]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.2.3 [0.2.1]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.2.1 [0.2.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.2.0 [0.1.0]: https://github.com/guppy-rs/guppy/releases/tag/target-spec-0.1.0