Skip to content

Commit

Permalink
Suppress improper_ctypes_definitions warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
volhovm committed Nov 19, 2024
1 parent 679ff10 commit 10cb473
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/crypto/kimchi_bindings/wasm/src/projective.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,18 @@ macro_rules! impl_projective {
proj.into()
}

// improper_ctypes_definitions is allowed here because the CamlBase/ScalarField struct
// already has #[repr(C)] in its definition
#[allow(improper_ctypes_definitions)]
#[wasm_bindgen]
pub extern "C" fn [<caml_ $name:snake _endo_base>]() -> $CamlBaseField {
let (endo_q, _endo_r) = poly_commitment::srs::endos::<GAffine>();
endo_q.into()
}

// improper_ctypes_definitions is allowed here because the CamlBase/ScalarField struct
// already has #[repr(C)] in its definition
#[allow(improper_ctypes_definitions)]
#[wasm_bindgen]
pub extern "C" fn [<caml_ $name:snake _endo_scalar>]() -> $CamlScalarField {
let (_endo_q, endo_r) = poly_commitment::srs::endos::<GAffine>();
Expand Down

0 comments on commit 10cb473

Please sign in to comment.