This commit is contained in:
Dmitriy Ryajov 2023-03-20 18:46:27 -06:00
parent 1b5b249f59
commit ea4a2a082e
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -1,30 +1,30 @@
// use crate::storageproofs::StorageProofs; use crate::storageproofs::StorageProofs;
// use std::str; use std::str;
// #[no_mangle] #[no_mangle]
// pub extern "C" fn init( pub extern "C" fn init(
// r1cs: *const u8, r1cs: *const u8,
// r1cs_len: usize, r1cs_len: usize,
// wasm: *const u8, wasm: *const u8,
// wasm_len: usize, wasm_len: usize,
// ) -> *mut StorageProofs { ) -> *mut StorageProofs {
// let r1cs = unsafe { let r1cs = unsafe {
// let slice = std::slice::from_raw_parts(r1cs, r1cs_len); let slice = std::slice::from_raw_parts(r1cs, r1cs_len);
// str::from_utf8(slice).unwrap() str::from_utf8(slice).unwrap()
// }; };
// let wasm = unsafe { let wasm = unsafe {
// let slice = std::slice::from_raw_parts(wasm, wasm_len); let slice = std::slice::from_raw_parts(wasm, wasm_len);
// str::from_utf8(slice).unwrap() str::from_utf8(slice).unwrap()
// }; };
// let storage_proofs = Box::into_raw(Box::new(StorageProofs::new( let storage_proofs = Box::into_raw(Box::new(StorageProofs::new(
// wasm.to_string(), wasm.to_string(),
// r1cs.to_string(), r1cs.to_string(),
// ))); )));
// return storage_proofs; return storage_proofs;
// } }
// #[cfg(test)] // #[cfg(test)]
// mod tests { // mod tests {