Skip to content

Commit

Permalink
Update to 1.75.0 (#66)
Browse files Browse the repository at this point in the history
* Update to 1.75.0

* armv7-apple-ios was removed

* Update CHANGELOG

* Update README

* Wtf mips
  • Loading branch information
Jake-Shadle authored Jan 2, 2024
1 parent e357a97 commit 578822d
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->
## [Unreleased] - ReleaseDate
### Changed
- [PR#66](https://github.com/EmbarkStudios/cfg-expr/pull/66) updated the builtin target list to 1.75.0.

## [0.15.5] - 2023-09-08
### Changed
- [PR#64](https://github.com/EmbarkStudios/cfg-expr/pull/64) updated the builtin target list to 1.72.0. It also changed the MSRV to 1.70.0.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

# `⚙️ cfg-expr`

**A parser and evaluator for Rust `cfg()` expressions. Builtin targets as of [Rust 1.72.0](https://forge.rust-lang.org/release/platform-support.html) are supported.**
**A parser and evaluator for Rust `cfg()` expressions. Builtin targets as of [Rust 1.75.0](https://forge.rust-lang.org/release/platform-support.html) are supported.**

[![Build Status](https://github.com/EmbarkStudios/cfg-expr/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/cfg-expr/actions?workflow=CI)
[![Crates.io](https://img.shields.io/crates/v/cfg-expr.svg)](https://crates.io/crates/cfg-expr)
[![Docs](https://docs.rs/cfg-expr/badge.svg)](https://docs.rs/cfg-expr)
[![Minimum Stable Rust Version](https://img.shields.io/badge/Rust%20MSRV-1.58.0-blue?color=fc8d62&logo=rust)](https://blog.rust-lang.org/2022/01/13/Rust-1.58.0.html)
[![Rust Targets](https://img.shields.io/badge/Rust%20Targets-1.69.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html)
[![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)
[![Rust Targets](https://img.shields.io/badge/Rust%20Targets-1.75.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html)
[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
[![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev)
</div>
Expand All @@ -22,7 +22,7 @@

`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.

It contains a list of all builtin targets known to rustc as of `1.72.0` that can be used to determine if a particular cfg expression is satisfiable.
It contains a list of all builtin targets known to rustc as of `1.75.0` that can be used to determine if a particular cfg expression is satisfiable.

```rust
use cfg_expr::{targets::get_builtin_target_by_triple, Expression, Predicate};
Expand Down
1 change: 0 additions & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
msrv = "1.58.0"
avoid-breaking-exported-api = false
14 changes: 14 additions & 0 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@ impl TargetMatcher for target_lexicon::Triple {
} else if arch == &targ::Arch::x86_64 {
self.architecture == Architecture::X86_64
|| self.architecture == Architecture::X86_64h
} else if arch == &targ::Arch::mips32r6 {
matches!(
self.architecture,
Architecture::Mips32(
Mips32Architecture::Mipsisa32r6 | Mips32Architecture::Mipsisa32r6el
)
)
} else if arch == &targ::Arch::mips64r6 {
matches!(
self.architecture,
Architecture::Mips64(
Mips64Architecture::Mipsisa64r6 | Mips64Architecture::Mipsisa64r6el
)
)
} else {
match arch.0.parse::<Architecture>() {
Ok(a) => match (self.architecture, a) {
Expand Down
4 changes: 2 additions & 2 deletions src/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ pub fn get_builtin_target_by_triple(triple: &str) -> Option<&'static TargetInfo>
/// versions.
///
/// ```
/// assert_eq!("1.72.0", cfg_expr::targets::rustc_version());
/// assert_eq!("1.75.0", cfg_expr::targets::rustc_version());
/// ```
pub fn rustc_version() -> &'static str {
builtins::RUSTC_VERSION
Expand All @@ -397,7 +397,7 @@ mod test {
#[test]
fn has_ios() {
assert_eq!(
8,
7,
super::ALL_BUILTINS
.iter()
.filter(|ti| ti.os == Some(super::Os::ios))
Expand Down
Loading

0 comments on commit 578822d

Please sign in to comment.