Skip to content

Comments

keccak: replace asm/simd features with --cfg keccak_backend#106

Merged
tarcieri merged 1 commit intomasterfrom
keccak/make-asm-and-simd-into-cfg-keccak-backend
Feb 13, 2026
Merged

keccak: replace asm/simd features with --cfg keccak_backend#106
tarcieri merged 1 commit intomasterfrom
keccak/make-asm-and-simd-into-cfg-keccak-backend

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Feb 13, 2026

Replaces these non-additive "features" with a 1-of-n backend selection enabled by using cfg instead.

  • asm => --cfg keccak_backend="armv8_asm"
  • simd => --cfg keccak_backend="simd"

Closes #85

@tarcieri tarcieri force-pushed the keccak/make-asm-and-simd-into-cfg-keccak-backend branch from 60dd4b2 to f4ed03f Compare February 13, 2026 21:13
@tarcieri tarcieri requested a review from newpavlov February 13, 2026 21:15
@newpavlov
Copy link
Member

The ASM backend could use a callback API, otherwise we branch on the target feature availability on each processed block. But I guess we could do it in future versions.

@tarcieri tarcieri force-pushed the keccak/make-asm-and-simd-into-cfg-keccak-backend branch from f4ed03f to b3e0bc9 Compare February 13, 2026 23:00
@tarcieri
Copy link
Member Author

@newpavlov I had a separate idea for how to address CPU feature detection, but I'll do that in a followup

Replaces these non-additive "features" with a 1-of-n backend selection
enabled by using `cfg` instead.

- `asm` => `--cfg keccak_backend="asm"`
- `simd` => `--cfg keccak_backend="simd"`
@tarcieri tarcieri force-pushed the keccak/make-asm-and-simd-into-cfg-keccak-backend branch from b3e0bc9 to c77424b Compare February 13, 2026 23:01
@tarcieri tarcieri merged commit 9dc0b8d into master Feb 13, 2026
17 checks passed
@tarcieri tarcieri deleted the keccak/make-asm-and-simd-into-cfg-keccak-backend branch February 13, 2026 23:04
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.

Replace crate features for backend selection with configuration flags

2 participants