Skip to content

Commit 861da36

Browse files
authored
cpufeatures v0.2.6 (#867)
1 parent dc26334 commit 861da36

File tree

5 files changed

+41
-15
lines changed

5 files changed

+41
-15
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cpufeatures/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.2.6 (2023-03-24)
9+
### Added
10+
- Support dynamic feature detection on iOS and derivative platforms ([#848])
11+
- Support for detecting AVX-512 target features ([#862])
12+
13+
[#848]: https://github.com/RustCrypto/utils/issues/848
14+
[#862]: https://github.com/RustCrypto/utils/pull/862
15+
816
## 0.2.5 (2022-09-04)
917
### Fixed
1018
- Add workaround for [CPUID bug] in `std` ([#800])

cpufeatures/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cpufeatures"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
description = """
55
Lightweight runtime CPU feature detection for x86/x86_64 and aarch64 with
66
no_std support and support for mobile targets including Android and iOS
@@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
1010
documentation = "https://docs.rs/cpufeatures"
1111
repository = "https://github.com/RustCrypto/utils"
1212
keywords = ["cpuid", "target-feature"]
13-
categories = ["no-std"]
13+
categories = ["hardware-support", "no-std"]
1414
edition = "2018"
1515
readme = "README.md"
1616

cpufeatures/README.md

+25-9
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,42 @@ macro.
1818

1919
## Supported architectures
2020

21-
### `aarch64`: Android, iOS, Linux, and macOS/M4 only
21+
# Supported target architectures
2222

23-
Note: ARM64 does not support OS-independent feature detection, so support must
24-
be implemented on an OS-by-OS basis.
23+
*NOTE: target features with an asterisk are unstable (nightly-only) and subject
24+
to change to match upstream name changes in the Rust standard library.
25+
26+
## `aarch64`
27+
28+
Linux, iOS, and macOS/ARM only (ARM64 does not support OS-independent feature detection)
2529

2630
Target features:
2731

28-
- `aes`
29-
- `sha2`
30-
- `sha3`
32+
- `aes`*
33+
- `sha2`*
34+
- `sha3`*
3135

32-
Note: please open a GitHub Issue to request support for additional features.
36+
## `x86`/`x86_64`
3337

34-
### `x86`/`x86_64`: OS independent and `no_std`-friendly
38+
OS independent and `no_std`-friendly
3539

3640
Target features:
3741

3842
- `adx`
3943
- `aes`
4044
- `avx`
4145
- `avx2`
46+
- `avx512bw`*
47+
- `avx512cd`*
48+
- `avx512dq`*
49+
- `avx512er`*
50+
- `avx512f`*
51+
- `avx512ifma`*
52+
- `avx512pf`*
53+
- `avx512vl`*
4254
- `bmi1`
4355
- `bmi2`
44-
- `fma`
56+
- `fma`,
4557
- `mmx`
4658
- `pclmulqdq`
4759
- `popcnt`
@@ -56,6 +68,9 @@ Target features:
5668
- `sse4.2`
5769
- `ssse3`
5870

71+
If you would like detection support for a target feature which is not on
72+
this list, please [open a GitHub issue].
73+
5974
## License
6075

6176
Licensed under either of:
@@ -88,3 +103,4 @@ dual licensed as above, without any additional terms or conditions.
88103

89104
[RustCrypto]: https://github.com/rustcrypto
90105
[RustCrypto/utils#378]: https://github.com/RustCrypto/utils/issues/378
106+
[open a GitHub issue]: https://github.com/RustCrypto/utils/issues/new?title=cpufeatures:%20requesting%20support%20for%20CHANGEME%20target%20feature

cpufeatures/src/lib.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
//! as a stopgap until Rust [RFC 2725] adding first-class target feature detection
33
//! macros to `libcore` is implemented.
44
//!
5-
//!
65
//! # Supported target architectures
76
//!
8-
//! *NOTE: target features with an asterisk are unstable and subject to change
9-
//! to match upstream name changes in the Rust standard library.
7+
//! *NOTE: target features with an asterisk are unstable (nightly-only) and
8+
//! subject to change to match upstream name changes in the Rust standard
9+
//! library.
1010
//!
1111
//! ## `aarch64`
1212
//!
1313
//! Linux, iOS, and macOS/ARM only (ARM64 does not support OS-independent feature detection)
1414
//!
1515
//! Target features:
16+
//!
1617
//! - `aes`*
1718
//! - `sha2`*
1819
//! - `sha3`*
@@ -22,6 +23,7 @@
2223
//! OS independent and `no_std`-friendly
2324
//!
2425
//! Target features:
26+
//!
2527
//! - `adx`
2628
//! - `aes`
2729
//! - `avx`

0 commit comments

Comments
 (0)