cmov
Conditional move CPU intrinsics which are guaranteed on major platforms (ARM32/ARM64, x86/x86_64, RISC-V) to execute in constant-time and not be rewritten as branches by the compiler. Provides wrappers for the CMOV family of instructions on x86/x86_64 and CSEL on AArch64, along with a portable "best-effort" pure Rust fallback implementation.
0.5.4
54M downloads/mo
#1168 most downloaded on crates.io
RustCrypto/utils
What this package is like to depend on
Last release 2 months ago
28 May 2026
Ships unpredictably
gaps range from 8 days to 1.9 years
Nearly every release is documented
notes for 6 of 6 stable releases
12 versions withdrawn
withdrawn after publishing
5 years old
21 releases · first in 2022
15 releases in the last 12 months
see the full history below
Release timeline
21 releases · Feb 2022 to May 2026Releases
latest 21-
0.5.428 May 2026Release notes
Open source →Security
- Fix GHSA-3rjw-m598-pq24]:
Cmov/CmovEqonaarch64can produce
wrong results if high-bits of registers are set (dba6c35)
Release notes
Open source →Security
- Fix GHSA-3rjw-m598-pq24:
Cmov/CmovEqonaarch64can produce wrong results if high-bits of registers are set (dba6c355)
- Fix GHSA-3rjw-m598-pq24]:
-
0.5.302 Apr 2026Release notes
Open source →Added
- Impl
Cmov/CmovEqforNonZeroUsize/NonZeroIsize(#1415)
Changed
- Avoid using
asm!undercfg(miri)(#1436)
Release notes
Open source →Added
- Impl
Cmov/CmovEqforNonZeroUsize/NonZeroIsize(#1415)
Changed
- Avoid using
asm!undercfg(miri)(#1436)
- Impl
-
0.5.220 Jan 2026 -
0.5.119 Jan 2026 withdrawn -
0.5.018 Jan 2026 withdrawnRelease notes
Open source →Added
- Optimized
CmovEqfor[u8](#1356) - Optimized
CmovEqfor[u16](#1370) - Impl
Cmov/CmovEqfor slices of unsigned integers (#1370, #1372) - Impl
Cmov/CmovEqfor slices of signed integers (#1373) - Impl
Cmov/CmovEqforisize/usize(#1375)
Changed
- Impls of
Cmov/CmovEqfor[T; N]are now bounded on[T]: Cmov(Eq)(#1372)
Removed
- Generic impl of
CmovEqfor[T]whereT: CmovEqin favor of specialized impls (#1356)
- Optimized
-
0.5.0-pre.217 Jan 2026 pre-releaseNothing published for this version
-
0.5.0-pre.117 Jan 2026 pre-releaseNothing published for this version
-
0.5.0-pre.016 Jan 2026 pre-releaseNothing published for this version
-
0.4.616 Jan 2026Release notes
Open source →Added
- Optimized
Cmovfor[u8; N](#1350) - Optimized
CmovEqfor[u8; N](#1353) - Optimized
Cmovfor[u8](#1354)
Fixed
- Provided
Cmov::cmovzimpl (#1351)
- Optimized
-
0.4.515 Jan 2026 -
0.4.414 Jan 2026Release notes
Open source →Security
- Fix non-constant-time assembly being emitted from portable backend on
thumbv6m-none-eabi(#1332)
- Fix non-constant-time assembly being emitted from portable backend on
-
0.4.328 Dec 2025 withdrawnRelease notes
Open source → -
0.4.227 Dec 2025 withdrawn -
0.4.120 Dec 2025 withdrawn -
0.4.010 Sep 2025 withdrawn -
0.3.114 Oct 2023 withdrawn -
0.3.003 Apr 2023 withdrawnRelease notes
Open source → -
0.2.026 Feb 2023 withdrawn -
0.1.102 Mar 2022 withdrawn -
0.1.027 Feb 2022 withdrawn -
0.0.011 Feb 2022 withdrawnNothing published for this version