Skip to content

Commit

Permalink
Merge branch 'berkeley' into feature/tweak-linter-max-depth
Browse files Browse the repository at this point in the history
psteckler authored Oct 19, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 1957e8c + a96f2ec commit 478772c
Showing 4 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/crypto/kimchi_bindings/stubs/pasta_bindings.ml
Original file line number Diff line number Diff line change
@@ -61,6 +61,8 @@ module Fp = struct

external print : t -> unit = "caml_pasta_fp_print"

external print_rust : t -> unit = "caml_pasta_fp_print_rust"

external copy : t -> t -> unit = "caml_pasta_fp_copy"

external mut_add : t -> t -> unit = "caml_pasta_fp_mut_add"
@@ -128,6 +130,8 @@ module Fq = struct

external print : t -> unit = "caml_pasta_fq_print"

external print_rust : t -> unit = "caml_pasta_fq_print_rust"

external copy : t -> t -> unit = "caml_pasta_fq_copy"

external mut_add : t -> t -> unit = "caml_pasta_fq_mut_add"
6 changes: 6 additions & 0 deletions src/lib/crypto/kimchi_bindings/stubs/src/arkworks/pasta_fp.rs
Original file line number Diff line number Diff line change
@@ -207,6 +207,12 @@ pub fn caml_pasta_fp_print(x: ocaml::Pointer<CamlFp>) {
);
}

#[ocaml_gen::func]
#[ocaml::func]
pub fn caml_pasta_fp_print_rust(x: ocaml::Pointer<CamlFp>) {
println!("{}", x.as_ref().0);
}

#[ocaml_gen::func]
#[ocaml::func]
pub fn caml_pasta_fp_copy(mut x: ocaml::Pointer<CamlFp>, y: ocaml::Pointer<CamlFp>) {
6 changes: 6 additions & 0 deletions src/lib/crypto/kimchi_bindings/stubs/src/arkworks/pasta_fq.rs
Original file line number Diff line number Diff line change
@@ -208,6 +208,12 @@ pub fn caml_pasta_fq_print(x: ocaml::Pointer<CamlFq>) {
);
}

#[ocaml_gen::func]
#[ocaml::func]
pub fn caml_pasta_fq_print_rust(x: ocaml::Pointer<CamlFq>) {
println!("{}", x.as_ref().0);
}

#[ocaml_gen::func]
#[ocaml::func]
pub fn caml_pasta_fq_copy(mut x: ocaml::Pointer<CamlFq>, y: ocaml::Pointer<CamlFq>) {
2 changes: 2 additions & 0 deletions src/lib/crypto/kimchi_bindings/stubs/src/main.rs
Original file line number Diff line number Diff line change
@@ -167,6 +167,7 @@ fn generate_pasta_bindings(mut w: impl std::io::Write, env: &mut Env) {
decl_func!(w, env, caml_pasta_fp_to_string => "to_string");
decl_func!(w, env, caml_pasta_fp_of_string => "of_string");
decl_func!(w, env, caml_pasta_fp_print => "print");
decl_func!(w, env, caml_pasta_fp_print_rust => "print_rust");
decl_func!(w, env, caml_pasta_fp_copy => "copy");
decl_func!(w, env, caml_pasta_fp_mut_add => "mut_add");
decl_func!(w, env, caml_pasta_fp_mut_sub => "mut_sub");
@@ -203,6 +204,7 @@ fn generate_pasta_bindings(mut w: impl std::io::Write, env: &mut Env) {
decl_func!(w, env, caml_pasta_fq_to_string => "to_string");
decl_func!(w, env, caml_pasta_fq_of_string => "of_string");
decl_func!(w, env, caml_pasta_fq_print => "print");
decl_func!(w, env, caml_pasta_fq_print_rust => "print_rust");
decl_func!(w, env, caml_pasta_fq_copy => "copy");
decl_func!(w, env, caml_pasta_fq_mut_add => "mut_add");
decl_func!(w, env, caml_pasta_fq_mut_sub => "mut_sub");

0 comments on commit 478772c

Please sign in to comment.