Skip to content

aes: use cpubits crate#532

Merged
tarcieri merged 2 commits intomasterfrom
aes/use-cpubits-crate
Feb 2, 2026
Merged

aes: use cpubits crate#532
tarcieri merged 2 commits intomasterfrom
aes/use-cpubits-crate

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Feb 2, 2026

The cpubits crate contains a macro for selecting between 32-bit and 64-bit backends, incorporating 64-bit overrides for certain natively 32-bit targets with native ISA support for operations on "register pairs", namely ARMv7 and WASM. It also supports overriding the selection with cfg(cpubits = "...")

This switches the selection of the 32-bit vs 64-bit soft backend, always compiled into the crate as it's used as a fallback implementation if intrinsics aren't available, to using cpubits.

The crate contains a vendored copy of cfg-if, so this also replaces cfg-if as a dependency with cpubits.

The `cpubits` crate contains a macro for selecting between 32-bit and
64-bit backends, incorporating 64-bit overrides for certain natively
32-bit targets with native ISA support for operations "register pairs",
namely ARMv7 and WASM. It also supports overriding the selection with
`cfg(cpubits = "...")`

This switches the selection of the 32-bit vs 64-bit soft backend, always
compiled into the crate as it's used as a fallback implementation if
intrinsics aren't available, to using `cpubits`.

The crate contains a vendored copy of `cfg-if`, so this also replaces
`cfg-if` as a dependency with `cpubits`.
@tarcieri tarcieri requested a review from newpavlov February 2, 2026 04:01
Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: Duh, I should read OP more carefully...

Co-authored-by: Artyom Pavlov <newpavlov@gmail.com>
@tarcieri tarcieri merged commit 175f7cb into master Feb 2, 2026
172 checks passed
@tarcieri tarcieri deleted the aes/use-cpubits-crate branch February 2, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants