Skip to content

Commit

Permalink
Merge pull request #441 from bmmoore/build-sync-send-fns
Browse files Browse the repository at this point in the history
Make prove and verify closures Sync+Send
  • Loading branch information
moodlezoup authored Aug 6, 2024
2 parents 68d602f + 9bc9fc2 commit 15bc8f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jolt-sdk/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ impl MacroBuilder {
quote! {
#[cfg(all(not(target_arch = "wasm32"), not(feature = "guest")))]
pub fn #build_fn_name() -> (
impl Fn(#(#input_types),*) -> #prove_output_ty,
impl Fn(jolt::RV32IHyraxProof) -> bool
impl Fn(#(#input_types),*) -> #prove_output_ty + Sync + Send,
impl Fn(jolt::RV32IHyraxProof) -> bool + Sync + Send
) {
#imports
let (program, preprocessing) = #preprocess_fn_name();
let program = std::rc::Rc::new(program);
let preprocessing = std::rc::Rc::new(preprocessing);
let program = std::sync::Arc::new(program);
let preprocessing = std::sync::Arc::new(preprocessing);

let program_cp = program.clone();
let preprocessing_cp = preprocessing.clone();
Expand Down

0 comments on commit 15bc8f7

Please sign in to comment.