Skip to content

cpufeatures: Enable compile time target features under Miri - #1513

Merged
newpavlov merged 1 commit into
RustCrypto:masterfrom
elichai:miri-cpufeatures
Aug 10, 2026
Merged

cpufeatures: Enable compile time target features under Miri#1513
newpavlov merged 1 commit into
RustCrypto:masterfrom
elichai:miri-cpufeatures

Conversation

@elichai

Copy link
Copy Markdown
Contributor

Miri already supports a lot of intrinsics: https://github.com/rust-lang/miri/tree/master/src/intrinsics so I think it make sense to return true for compile time enabled features, so if someone runs RUSTFLAGS=+avx2 cargo miri run it will actually enable those features, as the user explicitly asked for them

Also added tests to show that it works outside and inside of miri

tested everything locally too(including loongarch64 via qemu)

Comment threadcpufeatures/src/miri.rs
@newpavlov
newpavlov merged commit 47a4583 into RustCrypto:masterAug 10, 2026
16 checks passed
@elichai
elichai deleted the miri-cpufeatures branch August 10, 2026 08:20
Sign up for freeto 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

@elichai@newpavlov