mirror of
https://github.com/logos-storage/logos-storage-proofs.git
synced 2026-01-05 23:13:05 +00:00
update ffi
This commit is contained in:
parent
f850b6652c
commit
aa7750bc4b
@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
task genffi, "update the nim ffi bindings":
|
task genffi, "update the nim ffi bindings":
|
||||||
exec "cargo install --force nbindgen"
|
exec "cargo install nbindgen"
|
||||||
exec "nbindgen --crate codex-storage-proofs --output codex_proofs_ffi.nim"
|
exec "nbindgen --crate codex-storage-proofs --output codex_proofs_ffi.nim"
|
||||||
|
|||||||
@ -26,9 +26,9 @@ proc free_prover*(prover: ptr StorageProofs) {.importc: "free_prover".}
|
|||||||
## # Safety
|
## # Safety
|
||||||
#
|
#
|
||||||
# Construct a StorageProofs object
|
# Construct a StorageProofs object
|
||||||
proc init_proof_ctx*(r1cs: Buffer,
|
proc init_storage_proofs*(r1cs: Buffer,
|
||||||
wasm: Buffer,
|
wasm: Buffer,
|
||||||
zkey: ptr Buffer): (ptr StorageProofs) {.importc: "init_proof_ctx".}
|
zkey: ptr Buffer): (ptr StorageProofs) {.importc: "init_storage_proofs".}
|
||||||
|
|
||||||
## # Safety
|
## # Safety
|
||||||
#
|
#
|
||||||
|
|||||||
@ -25,4 +25,4 @@ import codex_proofs_ffi
|
|||||||
export codex_proofs_ffi
|
export codex_proofs_ffi
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
init()
|
init_proof_ctx()
|
||||||
|
|||||||
@ -36,7 +36,7 @@ impl ProofCtx {
|
|||||||
///
|
///
|
||||||
/// Construct a StorageProofs object
|
/// Construct a StorageProofs object
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn init_proof_ctx(
|
pub unsafe extern "C" fn init_storage_proofs(
|
||||||
r1cs: Buffer,
|
r1cs: Buffer,
|
||||||
wasm: Buffer,
|
wasm: Buffer,
|
||||||
zkey: *const Buffer,
|
zkey: *const Buffer,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user