Skip to content

Commit 2de737a

Browse files
authored
Update target list to 1.81.0 (#74)
* Ignore new unstable key * Update and pin target-lexicon * Update target list to 1.81.0 * Update lint list * Update CHANGELOG
1 parent 4735a0b commit 2de737a

File tree

8 files changed

+345
-14
lines changed

8 files changed

+345
-14
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ rustflags = [
4444
"-Wclippy::match_wild_err_arm",
4545
"-Wclippy::match_wildcard_for_single_variants",
4646
"-Wclippy::mem_forget",
47-
"-Wclippy::mismatched_target_os",
4847
"-Wclippy::missing_enforced_import_renames",
4948
"-Wclippy::mut_mut",
5049
"-Wclippy::mutex_integer",
@@ -72,6 +71,7 @@ rustflags = [
7271
"-Wclippy::useless_transmute",
7372
"-Wclippy::verbose_file_reads",
7473
"-Wclippy::zero_sized_map_values",
74+
"-Wunexpected_cfgs",
7575
"-Wfuture_incompatible",
7676
"-Wnonstandard_style",
7777
"-Wrust_2018_idioms",

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
<!-- next-header -->
1111
## [Unreleased] - ReleaseDate
12+
### Changed
13+
- [PR#74](https://github.com/EmbarkStudios/cfg-expr/pull/74) updated the builtin target list to 1.81.0.
14+
1215
## [0.16.0] - 2024-07-29
1316
### Changed
14-
- [PR#70](https://github.com/EmbarkStudios/cfg-expr/pull/70) updated the builtin target list to 1.78.0. Thanks [@sunshowers](https://github.com/sunshowers)!
17+
- [PR#70](https://github.com/EmbarkStudios/cfg-expr/pull/70) updated the builtin target list to 1.80.0. Thanks [@sunshowers](https://github.com/sunshowers)!
1518

1619
## [0.15.8] - 2024-04-10
1720
### Changed

Cargo.lock

Lines changed: 231 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ targets = ["target-lexicon"]
2424

2525
[dependencies]
2626
smallvec = "1.8"
27-
target-lexicon = { version = "0.12.15", optional = true }
27+
target-lexicon = { version = "=0.12.16", optional = true }
2828

2929
[dev-dependencies]
3030
similar-asserts = "1.1"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
# `⚙️ cfg-expr`
66

7-
**A parser and evaluator for Rust `cfg()` expressions. Builtin targets as of [1.80.0] are supported.**
7+
**A parser and evaluator for Rust `cfg()` expressions. Builtin targets as of [1.81.0] are supported.**
88

99
[![Build Status](https://github.com/EmbarkStudios/cfg-expr/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/cfg-expr/actions?workflow=CI)
1010
[![Crates.io](https://img.shields.io/crates/v/cfg-expr.svg)](https://crates.io/crates/cfg-expr)
1111
[![Docs](https://docs.rs/cfg-expr/badge.svg)](https://docs.rs/cfg-expr)
1212
[![Minimum Stable Rust Version](https://img.shields.io/badge/Rust%20MSRV-1.70.0-blue?color=fc8d62&logo=rust)](https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html)
13-
[![Rust Targets](https://img.shields.io/badge/Rust%20Targets-1.80.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html)
13+
[![Rust Targets](https://img.shields.io/badge/Rust%20Targets-1.81.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html)
1414
[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
1515
[![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev)
1616
</div>
@@ -24,7 +24,7 @@
2424

2525
`cfg-expr` is a crate that can be used to parse and evaluate Rust `cfg()` expressions, both as declarable in Rust code itself, as well in cargo manifests' `[target.'cfg()'.dependencies]` sections.
2626

27-
It contains a list of all builtin targets known to rustc as of [1.80.0] that can be used to determine if a particular cfg expression is satisfiable.
27+
It contains a list of all builtin targets known to rustc as of [1.81.0] that can be used to determine if a particular cfg expression is satisfiable.
2828

2929
```rust
3030
use cfg_expr::{targets::get_builtin_target_by_triple, Expression, Predicate};
@@ -110,4 +110,4 @@ at your option.
110110

111111
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
112112

113-
[1.80.0]: (https://forge.rust-lang.org/release/platform-support.html)
113+
[1.81.0]: (https://forge.rust-lang.org/release/platform-support.html)

src/expr.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,9 @@ impl TargetMatcher for target_lexicon::Triple {
187187
Environment::LinuxKernel => env == &targ::Env::gnu,
188188
_ => env.0.is_empty(),
189189
},
190-
OperatingSystem::WasiP1 => env.0.is_empty(),
190+
OperatingSystem::WasiP1 => env == &targ::Env::p1,
191191
OperatingSystem::WasiP2 => env == &targ::Env::p2,
192+
OperatingSystem::Wasi => env.0.is_empty() || env == &targ::Env::p1,
192193
_ => {
193194
if env.0.is_empty() {
194195
matches!(
@@ -367,7 +368,9 @@ impl TargetMatcher for target_lexicon::Triple {
367368
if self.vendor == v {
368369
true
369370
} else if let target_lexicon::Vendor::Custom(custom) = &self.vendor {
370-
custom.as_str() == "esp" && v == target_lexicon::Vendor::Espressif
371+
matches!(custom.as_str(), "esp" | "esp32" | "esp32s2" | "esp32s3")
372+
&& (v == target_lexicon::Vendor::Espressif
373+
|| v == target_lexicon::Vendor::Unknown)
371374
} else {
372375
false
373376
}

0 commit comments

Comments
 (0)