Skip to content

cpufeatures v0.2.6 #867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions cpufeatures/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.2.6 (2023-03-24)
### Added
- Support dynamic feature detection on iOS and derivative platforms ([#848])
- Support for detecting AVX-512 target features ([#862])

[#848]: https://github.com/RustCrypto/utils/issues/848
[#862]: https://github.com/RustCrypto/utils/pull/862

## 0.2.5 (2022-09-04)
### Fixed
- Add workaround for [CPUID bug] in `std` ([#800])
Expand Down
4 changes: 2 additions & 2 deletions cpufeatures/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cpufeatures"
version = "0.2.5"
version = "0.2.6"
description = """
Lightweight runtime CPU feature detection for x86/x86_64 and aarch64 with
no_std support and support for mobile targets including Android and iOS
Expand All @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/cpufeatures"
repository = "https://github.com/RustCrypto/utils"
keywords = ["cpuid", "target-feature"]
categories = ["no-std"]
categories = ["hardware-support", "no-std"]
edition = "2018"
readme = "README.md"

Expand Down
34 changes: 25 additions & 9 deletions cpufeatures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,42 @@ macro.

## Supported architectures

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

Note: ARM64 does not support OS-independent feature detection, so support must
be implemented on an OS-by-OS basis.
*NOTE: target features with an asterisk are unstable (nightly-only) and subject
to change to match upstream name changes in the Rust standard library.

## `aarch64`

Linux, iOS, and macOS/ARM only (ARM64 does not support OS-independent feature detection)

Target features:

- `aes`
- `sha2`
- `sha3`
- `aes`*
- `sha2`*
- `sha3`*

Note: please open a GitHub Issue to request support for additional features.
## `x86`/`x86_64`

### `x86`/`x86_64`: OS independent and `no_std`-friendly
OS independent and `no_std`-friendly

Target features:

- `adx`
- `aes`
- `avx`
- `avx2`
- `avx512bw`*
- `avx512cd`*
- `avx512dq`*
- `avx512er`*
- `avx512f`*
- `avx512ifma`*
- `avx512pf`*
- `avx512vl`*
- `bmi1`
- `bmi2`
- `fma`
- `fma`,
- `mmx`
- `pclmulqdq`
- `popcnt`
Expand All @@ -56,6 +68,9 @@ Target features:
- `sse4.2`
- `ssse3`

If you would like detection support for a target feature which is not on
this list, please [open a GitHub issue].

## License

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

[RustCrypto]: https://github.com/rustcrypto
[RustCrypto/utils#378]: https://github.com/RustCrypto/utils/issues/378
[open a GitHub issue]: https://github.com/RustCrypto/utils/issues/new?title=cpufeatures:%20requesting%20support%20for%20CHANGEME%20target%20feature
8 changes: 5 additions & 3 deletions cpufeatures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
//! as a stopgap until Rust [RFC 2725] adding first-class target feature detection
//! macros to `libcore` is implemented.
//!
//!
//! # Supported target architectures
//!
//! *NOTE: target features with an asterisk are unstable and subject to change
//! to match upstream name changes in the Rust standard library.
//! *NOTE: target features with an asterisk are unstable (nightly-only) and
//! subject to change to match upstream name changes in the Rust standard
//! library.
//!
//! ## `aarch64`
//!
//! Linux, iOS, and macOS/ARM only (ARM64 does not support OS-independent feature detection)
//!
//! Target features:
//!
//! - `aes`*
//! - `sha2`*
//! - `sha3`*
Expand All @@ -22,6 +23,7 @@
//! OS independent and `no_std`-friendly
//!
//! Target features:
//!
//! - `adx`
//! - `aes`
//! - `avx`
Expand Down