fix rebase issue
This commit is contained in:
parent
cc21fd21be
commit
865c7786e5
1 changed files with 1 additions and 52 deletions
|
@ -238,55 +238,4 @@ fn main() {
|
|||
Err(e) => panic!(format!("Module validation error: {}", e.to_string())),
|
||||
}
|
||||
}
|
||||
} }
|
||||
|
||||
/* Turn the output binary into a source file for zokrates_core */
|
||||
let fname =
|
||||
"../plugins/partialeq_wasm/target/wasm32-unknown-unknown/release/partialeq_wasm.wasm";
|
||||
match validate(fname) {
|
||||
Ok(module) => {
|
||||
let out_dir = env::var("OUT_DIR").unwrap();
|
||||
let dest_path = Path::new(&out_dir).join("partialeq_wasm.rs");
|
||||
let m0 = module.clone();
|
||||
let m1 = add_global_if_missing(
|
||||
"min_inputs",
|
||||
&m0,
|
||||
parity_wasm::elements::ValueType::I32,
|
||||
1,
|
||||
false,
|
||||
)
|
||||
.unwrap();
|
||||
let m2 = add_global_if_missing(
|
||||
"min_outputs",
|
||||
&m1,
|
||||
parity_wasm::elements::ValueType::I32,
|
||||
2,
|
||||
false,
|
||||
)
|
||||
.unwrap();
|
||||
let m3 = add_global_if_missing(
|
||||
"field_size",
|
||||
&m2,
|
||||
parity_wasm::elements::ValueType::I32,
|
||||
32,
|
||||
false,
|
||||
)
|
||||
.unwrap();
|
||||
let buf = parity_wasm::serialize(m3).unwrap();
|
||||
std::fs::File::create(dest_path)
|
||||
.unwrap()
|
||||
.write_all(
|
||||
format!(
|
||||
"
|
||||
pub const PARTIALEQ_WASM : &'static [u8] = &{:?};
|
||||
",
|
||||
buf
|
||||
)
|
||||
.as_bytes(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
Err(e) => panic!(format!("Module validation error: {}", e.to_string())),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue