Skip to content

Commit 0256fff

Browse files
authored
cmov v0.2.0 (#839)
1 parent 754487e commit 0256fff

File tree

6 files changed

+30
-14
lines changed

6 files changed

+30
-14
lines changed

.github/workflows/cmov.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
matrix:
2929
rust:
30-
- 1.59.0 # MSRV
30+
- 1.60.0 # MSRV
3131
- stable
3232
target:
3333
- thumbv7em-none-eabi
@@ -51,23 +51,23 @@ jobs:
5151
# 32-bit Linux
5252
- target: i686-unknown-linux-gnu
5353
platform: ubuntu-latest
54-
rust: 1.59.0 # MSRV
54+
rust: 1.60.0 # MSRV
5555
deps: sudo apt update && sudo apt install gcc-multilib
5656

5757
# 64-bit Linux
5858
- target: x86_64-unknown-linux-gnu
5959
platform: ubuntu-latest
60-
rust: 1.59.0 # MSRV
60+
rust: 1.60.0 # MSRV
6161

6262
# 64-bit Windows
6363
- target: x86_64-pc-windows-msvc
6464
platform: windows-latest
65-
rust: 1.59.0 # MSRV
65+
rust: 1.60.0 # MSRV
6666

6767
# 64-bit macOS
6868
- target: x86_64-apple-darwin
6969
platform: macos-latest
70-
rust: 1.59.0 # MSRV
70+
rust: 1.60.0 # MSRV
7171

7272
runs-on: ${{ matrix.platform }}
7373
steps:
@@ -89,13 +89,13 @@ jobs:
8989
include:
9090
# ARM64
9191
- target: aarch64-unknown-linux-gnu
92-
rust: 1.59.0 # MSRV
92+
rust: 1.60.0 # MSRV
9393
- target: aarch64-unknown-linux-gnu
9494
rust: stable
9595

9696
# PPC32
9797
- target: powerpc-unknown-linux-gnu
98-
rust: 1.59.0 # MSRV
98+
rust: 1.60.0 # MSRV
9999
- target: powerpc-unknown-linux-gnu
100100
rust: stable
101101

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmov/CHANGELOG.md

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

7+
## 0.2.0 (2023-02-26)
8+
### Added
9+
- `Condition` alias for `u8` ([#830])
10+
11+
### Changed
12+
- Redesigned trait-based API ([#830])
13+
- Built around a `Cmov` trait
14+
- Trait is impl'd for `u8`, `u16`, `u32`, `u64`, `u128`
15+
- Accepts a `Condition` (i.e. `u8`) as a predicate
16+
- MSRV 1.60 ([#839])
17+
18+
[#830]: https://github.com/RustCrypto/utils/pull/830
19+
[#839]: https://github.com/RustCrypto/utils/pull/839
20+
721
## 0.1.1 (2022-03-02)
822
### Added
923
- `cmovz`/`cmovnz`-alike support for AArch64 targets ([#744])

cmov/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ constant-time and not be rewritten as branches by the compiler.
66
Provides wrappers for the CMOV family of instructions on x86/x86_64
77
and CSEL on AArch64.
88
"""
9-
version = "0.2.0-pre"
9+
version = "0.2.0"
1010
authors = ["RustCrypto Developers"]
1111
license = "Apache-2.0 OR MIT"
1212
repository = "https://github.com/RustCrypto/utils/tree/master/cmov"
1313
categories = ["cryptography", "hardware-support", "no-std"]
1414
keywords = ["crypto", "intrinsics"]
1515
readme = "README.md"
1616
edition = "2021"
17-
rust-version = "1.59"
17+
rust-version = "1.60"

cmov/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [RustCrypto]: Conditional Move Intrinsics
1+
# [RustCrypto]: CMOV (Conditional Move)
22

33
[![Crate][crate-image]][crate-link]
44
[![Docs][docs-image]][docs-link]
@@ -10,7 +10,8 @@ Conditional move CPU intrinsics which are guaranteed to execute in
1010
constant-time and not be rewritten as branches by the compiler.
1111

1212
Provides wrappers for the [CMOV family] of instructions on x86/x86_64 and
13-
the [CSEL] instruction on AArch64 CPUs.
13+
the [CSEL] instruction on AArch64 CPUs, along with a portable fallback
14+
implementation for other CPU architectures.
1415

1516
[Documentation][docs-link]
1617

@@ -50,7 +51,7 @@ Please open an issue with your desired CPU architecture if this interests you.
5051

5152
## Minimum Supported Rust Version
5253

53-
Rust **1.59** or newer.
54+
Rust **1.60** or newer.
5455

5556
In the future, we reserve the right to change MSRV (i.e. MSRV is out-of-scope
5657
for this crate's SemVer guarantees), however when we do it will be accompanied by
@@ -78,7 +79,7 @@ dual licensed as above, without any additional terms or conditions.
7879
[docs-image]: https://docs.rs/cmov/badge.svg
7980
[docs-link]: https://docs.rs/cmov/
8081
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
81-
[msrv-image]: https://img.shields.io/badge/rustc-1.59+-blue.svg
82+
[msrv-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg
8283
[build-image]: https://github.com/RustCrypto/utils/actions/workflows/cmov.yml/badge.svg
8384
[build-link]: https://github.com/RustCrypto/utils/actions/workflows/cmov.yml
8485

cmov/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ mod x86;
1717
pub type Condition = u8;
1818

1919
/// Conditional move
20+
// TODO(tarcieri): make one of `cmovz`/`cmovnz` a provided method which calls the other?
2021
pub trait Cmov {
2122
/// Move if zero.
2223
///

0 commit comments

Comments
 (0)