Skip to content

Commit

Permalink
try to fix wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
kilic committed May 13, 2024
1 parent cd8b36a commit ce1512f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/derive/field/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ macro_rules! field_bits {

let limbs = (0..Self::NUM_LIMBS * 8 / STEP)
.map(|off| {
u64::from_le_bytes(bytes[off * STEP..(off + 1) * STEP].try_into().unwrap())
#[cfg(target_pointer_width = "64")]
let limb = u64::from_le_bytes(
bytes[off * STEP..(off + 1) * STEP].try_into().unwrap(),
);
#[cfg(not(target_pointer_width = "64"))]
let limb = u32::from_le_bytes(
bytes[off * STEP..(off + 1) * STEP].try_into().unwrap(),
);

limb
})
.collect::<Vec<_>>();

Expand Down

0 comments on commit ce1512f

Please sign in to comment.