Skip to content
Snippets Groups Projects

add an example to print the Fq and Fr of all the Arkworks' curves

Merged STEVAN Antoine requested to merge print-all-curves into main
1 file
+ 28
0
Compare changes
  • Side-by-side
  • Inline
+ 28
0
@@ -9,6 +9,34 @@ fn show_curve<Fr: PrimeField, Fq: PrimeField>(name: &str) {
);
}
/// takes a sequence of curve crate names and calls the [`show_curve`] function
/// for you
///
/// this macro accepts a trailling comma in case you have a big list that spans
/// over multiple lines, e.g.
///
/// ## examples
/// ```rust
/// show_curve(ark_bls12_381)
/// ```
/// or
/// ```rust
/// show_curve(
/// ark_bls12_381,
/// ark_bn254,
/// ark_pallas,
/// ark_vesta
/// )
/// ```
/// or
/// ```rust
/// show_curve(
/// ark_bls12_381,
/// ark_bn254,
/// ark_pallas,
/// ark_vesta,
/// )
/// ```
macro_rules! show_curve {
($($c:ident),+ $(,)?) => {
$(show_curve::<$c::Fr, $c::Fq>(stringify!($c));)*
Loading