plonk_wasm/arkworks/mod.rs
1//! This module contains wrapper types to Arkworks types.
2//! To use Arkwork types in OCaml, you have to convert to these types,
3//! and convert back from them to use them in Rust.
4//!
5//! For example:
6//!
7//! ```
8//! use marlin_plonk_bindings::arkworks::CamlBiginteger256;
9//! use ark_ff::BigInteger256;
10//!
11//! #[ocaml::func]
12//! pub fn caml_add(x: CamlBigInteger256, y: CamlBigInteger256) -> CamlBigInteger256 {
13//! let x: BigInteger256 = x.into();
14//! let y: BigInteger256 = y.into();
15//! (x + y).into()
16//! }
17//! ```
18//!
19
20pub mod bigint_256;
21pub mod group_affine;
22pub mod group_projective;
23pub mod pasta_fp;
24pub mod pasta_fq;
25
26// re-export what's important
27
28pub use bigint_256::WasmBigInteger256;
29pub use group_affine::{WasmGPallas, WasmGVesta};
30pub use group_projective::{WasmPallasGProjective, WasmVestaGProjective};
31pub use pasta_fp::WasmPastaFp;
32pub use pasta_fq::WasmPastaFq;