Skip to content

Commit

Permalink
Add compilation error for zknh on non-RISC-V targets
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Aug 21, 2024
1 parent 14158e9 commit 55538b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sha2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
feature(riscv_ext_intrinsics)
)]

#[cfg(all(
any(sha2_backend = "riscv-zknh", sha2_backend = "riscv-zknh-compact"),
not(any(any(target_arch = "riscv32", target_arch = "riscv64")))
))]
compile_error!("The Zknh backends can be enabled only for RISC-V targets");

pub use digest::{self, Digest};

#[cfg(feature = "oid")]
Expand Down

0 comments on commit 55538b5

Please sign in to comment.