From 028f0280cd7b4ed9ab12463ce0164207bd742951 Mon Sep 17 00:00:00 2001 From: "Ya-wen, Jeng" Date: Tue, 16 Jan 2024 11:12:53 +0800 Subject: [PATCH] chore(ios): overwrite `uniffi-bindgen` --- mopro-ios/MoproKit/Bindings/mopro.swift | 158 ++++++++++++---------- mopro-ios/MoproKit/Include/moproFFI.h | 171 +++++++++++++++++++----- 2 files changed, 226 insertions(+), 103 deletions(-) diff --git a/mopro-ios/MoproKit/Bindings/mopro.swift b/mopro-ios/MoproKit/Bindings/mopro.swift index b604ae2b..32127caf 100644 --- a/mopro-ios/MoproKit/Bindings/mopro.swift +++ b/mopro-ios/MoproKit/Bindings/mopro.swift @@ -19,13 +19,13 @@ fileprivate extension RustBuffer { } static func from(_ ptr: UnsafeBufferPointer) -> RustBuffer { - try! rustCall { ffi_mopro_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) } + try! rustCall { ffi_mopro_ffi_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) } } // Frees the buffer in place. // The buffer must not be used after this is called. func deallocate() { - try! rustCall { ffi_mopro_rustbuffer_free(self, $0) } + try! rustCall { ffi_mopro_ffi_rustbuffer_free(self, $0) } } } @@ -223,6 +223,7 @@ fileprivate enum UniffiInternalError: LocalizedError { fileprivate let CALL_SUCCESS: Int8 = 0 fileprivate let CALL_ERROR: Int8 = 1 fileprivate let CALL_PANIC: Int8 = 2 +fileprivate let CALL_CANCELLED: Int8 = 3 fileprivate extension RustCallStatus { init() { @@ -285,6 +286,9 @@ private func uniffiCheckCallStatus( throw UniffiInternalError.rustPanic("Rust panic") } + case CALL_CANCELLED: + throw CancellationError() + default: throw UniffiInternalError.unexpectedRustCallStatusCode } @@ -370,7 +374,7 @@ fileprivate struct FfiConverterData: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Data { let len: Int32 = try readInt(&buf) - return Data(bytes: try readBytes(&buf, count: Int(len))) + return Data(try readBytes(&buf, count: Int(len))) } public static func write(_ value: Data, into buf: inout [UInt8]) { @@ -382,9 +386,9 @@ fileprivate struct FfiConverterData: FfiConverterRustBuffer { public protocol MoproCircomProtocol { - func `setup`(`wasmPath`: String, `r1csPath`: String) throws -> SetupResult - func `generateProof`(`circuitInputs`: [String: [String]]) throws -> GenerateProofResult - func `verifyProof`(`proof`: Data, `publicInput`: Data) throws -> Bool + func generateProof(circuitInputs: [String: [String]]) throws -> GenerateProofResult + func setup(wasmPath: String, r1csPath: String) throws -> SetupResult + func verifyProof(proof: Data, publicInput: Data) throws -> Bool } @@ -399,12 +403,12 @@ public class MoproCircom: MoproCircomProtocol { } public convenience init() { self.init(unsafeFromRawPointer: try! rustCall() { - uniffi_mopro_fn_constructor_moprocircom_new($0) + uniffi_mopro_ffi_fn_constructor_moprocircom_new($0) }) } deinit { - try! rustCall { uniffi_mopro_fn_free_moprocircom(pointer, $0) } + try! rustCall { uniffi_mopro_ffi_fn_free_moprocircom(pointer, $0) } } @@ -412,36 +416,36 @@ public class MoproCircom: MoproCircomProtocol { - public func `setup`(`wasmPath`: String, `r1csPath`: String) throws -> SetupResult { - return try FfiConverterTypeSetupResult.lift( + public func generateProof(circuitInputs: [String: [String]]) throws -> GenerateProofResult { + return try FfiConverterTypeGenerateProofResult.lift( try rustCallWithError(FfiConverterTypeMoproError.lift) { - uniffi_mopro_fn_method_moprocircom_setup(self.pointer, - FfiConverterString.lower(`wasmPath`), - FfiConverterString.lower(`r1csPath`),$0 + uniffi_mopro_ffi_fn_method_moprocircom_generate_proof(self.pointer, + FfiConverterDictionaryStringSequenceString.lower(circuitInputs),$0 ) } ) } - public func `generateProof`(`circuitInputs`: [String: [String]]) throws -> GenerateProofResult { - return try FfiConverterTypeGenerateProofResult.lift( + public func setup(wasmPath: String, r1csPath: String) throws -> SetupResult { + return try FfiConverterTypeSetupResult.lift( try rustCallWithError(FfiConverterTypeMoproError.lift) { - uniffi_mopro_fn_method_moprocircom_generate_proof(self.pointer, - FfiConverterDictionaryStringSequenceString.lower(`circuitInputs`),$0 + uniffi_mopro_ffi_fn_method_moprocircom_setup(self.pointer, + FfiConverterString.lower(wasmPath), + FfiConverterString.lower(r1csPath),$0 ) } ) } - public func `verifyProof`(`proof`: Data, `publicInput`: Data) throws -> Bool { + public func verifyProof(proof: Data, publicInput: Data) throws -> Bool { return try FfiConverterBool.lift( try rustCallWithError(FfiConverterTypeMoproError.lift) { - uniffi_mopro_fn_method_moprocircom_verify_proof(self.pointer, - FfiConverterData.lower(`proof`), - FfiConverterData.lower(`publicInput`),$0 + uniffi_mopro_ffi_fn_method_moprocircom_verify_proof(self.pointer, + FfiConverterData.lower(proof), + FfiConverterData.lower(publicInput),$0 ) } ) @@ -489,32 +493,32 @@ public func FfiConverterTypeMoproCircom_lower(_ value: MoproCircom) -> UnsafeMut public struct GenerateProofResult { - public var `proof`: Data - public var `inputs`: Data + public var proof: Data + public var inputs: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(`proof`: Data, `inputs`: Data) { - self.`proof` = `proof` - self.`inputs` = `inputs` + public init(proof: Data, inputs: Data) { + self.proof = proof + self.inputs = inputs } } extension GenerateProofResult: Equatable, Hashable { public static func ==(lhs: GenerateProofResult, rhs: GenerateProofResult) -> Bool { - if lhs.`proof` != rhs.`proof` { + if lhs.proof != rhs.proof { return false } - if lhs.`inputs` != rhs.`inputs` { + if lhs.inputs != rhs.inputs { return false } return true } public func hash(into hasher: inout Hasher) { - hasher.combine(`proof`) - hasher.combine(`inputs`) + hasher.combine(proof) + hasher.combine(inputs) } } @@ -522,14 +526,14 @@ extension GenerateProofResult: Equatable, Hashable { public struct FfiConverterTypeGenerateProofResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GenerateProofResult { return try GenerateProofResult( - `proof`: FfiConverterData.read(from: &buf), - `inputs`: FfiConverterData.read(from: &buf) + proof: FfiConverterData.read(from: &buf), + inputs: FfiConverterData.read(from: &buf) ) } public static func write(_ value: GenerateProofResult, into buf: inout [UInt8]) { - FfiConverterData.write(value.`proof`, into: &buf) - FfiConverterData.write(value.`inputs`, into: &buf) + FfiConverterData.write(value.proof, into: &buf) + FfiConverterData.write(value.inputs, into: &buf) } } @@ -544,26 +548,26 @@ public func FfiConverterTypeGenerateProofResult_lower(_ value: GenerateProofResu public struct SetupResult { - public var `provingKey`: Data + public var provingKey: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(`provingKey`: Data) { - self.`provingKey` = `provingKey` + public init(provingKey: Data) { + self.provingKey = provingKey } } extension SetupResult: Equatable, Hashable { public static func ==(lhs: SetupResult, rhs: SetupResult) -> Bool { - if lhs.`provingKey` != rhs.`provingKey` { + if lhs.provingKey != rhs.provingKey { return false } return true } public func hash(into hasher: inout Hasher) { - hasher.combine(`provingKey`) + hasher.combine(provingKey) } } @@ -571,12 +575,12 @@ extension SetupResult: Equatable, Hashable { public struct FfiConverterTypeSetupResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SetupResult { return try SetupResult( - `provingKey`: FfiConverterData.read(from: &buf) + provingKey: FfiConverterData.read(from: &buf) ) } public static func write(_ value: SetupResult, into buf: inout [UInt8]) { - FfiConverterData.write(value.`provingKey`, into: &buf) + FfiConverterData.write(value.provingKey, into: &buf) } } @@ -628,7 +632,7 @@ public struct FfiConverterTypeMoproError: FfiConverterRustBuffer { - case let .CircomError(message): + case .CircomError(_ /* message is ignored*/): writeInt(&buf, Int32(1)) @@ -686,47 +690,56 @@ fileprivate struct FfiConverterDictionaryStringSequenceString: FfiConverterRustB } } -public func `add`(`a`: UInt32, `b`: UInt32) -> UInt32 { +public func add(a: UInt32, b: UInt32) -> UInt32 { return try! FfiConverterUInt32.lift( try! rustCall() { - uniffi_mopro_fn_func_add( - FfiConverterUInt32.lower(`a`), - FfiConverterUInt32.lower(`b`),$0) + uniffi_mopro_ffi_fn_func_add( + FfiConverterUInt32.lower(a), + FfiConverterUInt32.lower(b),$0) } ) } -public func `hello`() -> String { +public func generateProof2(circuitInputs: [String: [String]]) throws -> GenerateProofResult { + return try FfiConverterTypeGenerateProofResult.lift( + try rustCallWithError(FfiConverterTypeMoproError.lift) { + uniffi_mopro_ffi_fn_func_generate_proof2( + FfiConverterDictionaryStringSequenceString.lower(circuitInputs),$0) +} + ) +} + +public func hello() -> String { return try! FfiConverterString.lift( try! rustCall() { - uniffi_mopro_fn_func_hello($0) + uniffi_mopro_ffi_fn_func_hello($0) } ) } -public func `initializeMopro`() throws { +public func initializeMopro() throws { try rustCallWithError(FfiConverterTypeMoproError.lift) { - uniffi_mopro_fn_func_initialize_mopro($0) + uniffi_mopro_ffi_fn_func_initialize_mopro($0) } } -public func `generateProof2`(`circuitInputs`: [String: [String]]) throws -> GenerateProofResult { - return try FfiConverterTypeGenerateProofResult.lift( - try rustCallWithError(FfiConverterTypeMoproError.lift) { - uniffi_mopro_fn_func_generate_proof2( - FfiConverterDictionaryStringSequenceString.lower(`circuitInputs`),$0) +public func initializeMoproDylib(dylibPath: String) throws { + try rustCallWithError(FfiConverterTypeMoproError.lift) { + uniffi_mopro_ffi_fn_func_initialize_mopro_dylib( + FfiConverterString.lower(dylibPath),$0) } - ) } -public func `verifyProof2`(`proof`: Data, `publicInput`: Data) throws -> Bool { + + +public func verifyProof2(proof: Data, publicInput: Data) throws -> Bool { return try FfiConverterBool.lift( try rustCallWithError(FfiConverterTypeMoproError.lift) { - uniffi_mopro_fn_func_verify_proof2( - FfiConverterData.lower(`proof`), - FfiConverterData.lower(`publicInput`),$0) + uniffi_mopro_ffi_fn_func_verify_proof2( + FfiConverterData.lower(proof), + FfiConverterData.lower(publicInput),$0) } ) } @@ -740,37 +753,40 @@ private enum InitializationResult { // the code inside is only computed once. private var initializationResult: InitializationResult { // Get the bindings contract version from our ComponentInterface - let bindings_contract_version = 22 + let bindings_contract_version = 24 // Get the scaffolding contract version by calling the into the dylib - let scaffolding_contract_version = ffi_mopro_uniffi_contract_version() + let scaffolding_contract_version = ffi_mopro_ffi_uniffi_contract_version() if bindings_contract_version != scaffolding_contract_version { return InitializationResult.contractVersionMismatch } - if (uniffi_mopro_checksum_func_add() != 19178) { + if (uniffi_mopro_ffi_checksum_func_add() != 8411) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_mopro_ffi_checksum_func_generate_proof2() != 40187) { return InitializationResult.apiChecksumMismatch } - if (uniffi_mopro_checksum_func_hello() != 309) { + if (uniffi_mopro_ffi_checksum_func_hello() != 46136) { return InitializationResult.apiChecksumMismatch } - if (uniffi_mopro_checksum_func_initialize_mopro() != 10574) { + if (uniffi_mopro_ffi_checksum_func_initialize_mopro() != 17540) { return InitializationResult.apiChecksumMismatch } - if (uniffi_mopro_checksum_func_generate_proof2() != 6969) { + if (uniffi_mopro_ffi_checksum_func_initialize_mopro_dylib() != 64476) { return InitializationResult.apiChecksumMismatch } - if (uniffi_mopro_checksum_func_verify_proof2() != 6153) { + if (uniffi_mopro_ffi_checksum_func_verify_proof2() != 37192) { return InitializationResult.apiChecksumMismatch } - if (uniffi_mopro_checksum_method_moprocircom_setup() != 40345) { + if (uniffi_mopro_ffi_checksum_method_moprocircom_generate_proof() != 64602) { return InitializationResult.apiChecksumMismatch } - if (uniffi_mopro_checksum_method_moprocircom_generate_proof() != 30646) { + if (uniffi_mopro_ffi_checksum_method_moprocircom_setup() != 57700) { return InitializationResult.apiChecksumMismatch } - if (uniffi_mopro_checksum_method_moprocircom_verify_proof() != 51813) { + if (uniffi_mopro_ffi_checksum_method_moprocircom_verify_proof() != 61522) { return InitializationResult.apiChecksumMismatch } - if (uniffi_mopro_checksum_constructor_moprocircom_new() != 56690) { + if (uniffi_mopro_ffi_checksum_constructor_moprocircom_new() != 42205) { return InitializationResult.apiChecksumMismatch } diff --git a/mopro-ios/MoproKit/Include/moproFFI.h b/mopro-ios/MoproKit/Include/moproFFI.h index a58cb120..745221d8 100644 --- a/mopro-ios/MoproKit/Include/moproFFI.h +++ b/mopro-ios/MoproKit/Include/moproFFI.h @@ -32,7 +32,7 @@ typedef struct RustBuffer typedef int32_t (*ForeignCallback)(uint64_t, int32_t, const uint8_t *_Nonnull, int32_t, RustBuffer *_Nonnull); // Task defined in Rust that Swift executes -typedef void (*UniFfiRustTaskCallback)(const void * _Nullable); +typedef void (*UniFfiRustTaskCallback)(const void * _Nullable, int8_t); // Callback to execute Rust tasks using a Swift Task // @@ -41,7 +41,7 @@ typedef void (*UniFfiRustTaskCallback)(const void * _Nullable); // delay: Delay in MS // task: UniFfiRustTaskCallback to call // task_data: data to pass the task callback -typedef void (*UniFfiForeignExecutorCallback)(size_t, uint32_t, UniFfiRustTaskCallback _Nullable, const void * _Nullable); +typedef int8_t (*UniFfiForeignExecutorCallback)(size_t, uint32_t, UniFfiRustTaskCallback _Nullable, const void * _Nullable); typedef struct ForeignBytes { @@ -59,73 +59,180 @@ typedef struct RustCallStatus { // ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️ #endif // def UNIFFI_SHARED_H -// Callbacks for UniFFI Futures -typedef void (*UniFfiFutureCallbackUInt8)(const void * _Nonnull, uint8_t, RustCallStatus); -typedef void (*UniFfiFutureCallbackInt8)(const void * _Nonnull, int8_t, RustCallStatus); -typedef void (*UniFfiFutureCallbackUInt32)(const void * _Nonnull, uint32_t, RustCallStatus); -typedef void (*UniFfiFutureCallbackUnsafeMutableRawPointer)(const void * _Nonnull, void*_Nonnull, RustCallStatus); -typedef void (*UniFfiFutureCallbackRustBuffer)(const void * _Nonnull, RustBuffer, RustCallStatus); +// Continuation callback for UniFFI Futures +typedef void (*UniFfiRustFutureContinuation)(void * _Nonnull, int8_t); // Scaffolding functions -void uniffi_mopro_fn_free_moprocircom(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status +void uniffi_mopro_ffi_fn_free_moprocircom(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status ); -void*_Nonnull uniffi_mopro_fn_constructor_moprocircom_new(RustCallStatus *_Nonnull out_status +void*_Nonnull uniffi_mopro_ffi_fn_constructor_moprocircom_new(RustCallStatus *_Nonnull out_status ); -RustBuffer uniffi_mopro_fn_method_moprocircom_setup(void*_Nonnull ptr, RustBuffer wasm_path, RustBuffer r1cs_path, RustCallStatus *_Nonnull out_status +RustBuffer uniffi_mopro_ffi_fn_method_moprocircom_generate_proof(void*_Nonnull ptr, RustBuffer circuit_inputs, RustCallStatus *_Nonnull out_status ); -RustBuffer uniffi_mopro_fn_method_moprocircom_generate_proof(void*_Nonnull ptr, RustBuffer circuit_inputs, RustCallStatus *_Nonnull out_status +RustBuffer uniffi_mopro_ffi_fn_method_moprocircom_setup(void*_Nonnull ptr, RustBuffer wasm_path, RustBuffer r1cs_path, RustCallStatus *_Nonnull out_status ); -int8_t uniffi_mopro_fn_method_moprocircom_verify_proof(void*_Nonnull ptr, RustBuffer proof, RustBuffer public_input, RustCallStatus *_Nonnull out_status +int8_t uniffi_mopro_ffi_fn_method_moprocircom_verify_proof(void*_Nonnull ptr, RustBuffer proof, RustBuffer public_input, RustCallStatus *_Nonnull out_status ); -uint32_t uniffi_mopro_fn_func_add(uint32_t a, uint32_t b, RustCallStatus *_Nonnull out_status +uint32_t uniffi_mopro_ffi_fn_func_add(uint32_t a, uint32_t b, RustCallStatus *_Nonnull out_status ); -RustBuffer uniffi_mopro_fn_func_hello(RustCallStatus *_Nonnull out_status +RustBuffer uniffi_mopro_ffi_fn_func_generate_proof2(RustBuffer circuit_inputs, RustCallStatus *_Nonnull out_status +); +RustBuffer uniffi_mopro_ffi_fn_func_hello(RustCallStatus *_Nonnull out_status ); -void uniffi_mopro_fn_func_initialize_mopro(RustCallStatus *_Nonnull out_status +void uniffi_mopro_ffi_fn_func_initialize_mopro(RustCallStatus *_Nonnull out_status ); -RustBuffer uniffi_mopro_fn_func_generate_proof2(RustBuffer circuit_inputs, RustCallStatus *_Nonnull out_status +void uniffi_mopro_ffi_fn_func_initialize_mopro_dylib(RustBuffer dylib_path, RustCallStatus *_Nonnull out_status +); +int8_t uniffi_mopro_ffi_fn_func_verify_proof2(RustBuffer proof, RustBuffer public_input, RustCallStatus *_Nonnull out_status +); +RustBuffer ffi_mopro_ffi_rustbuffer_alloc(int32_t size, RustCallStatus *_Nonnull out_status +); +RustBuffer ffi_mopro_ffi_rustbuffer_from_bytes(ForeignBytes bytes, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rustbuffer_free(RustBuffer buf, RustCallStatus *_Nonnull out_status +); +RustBuffer ffi_mopro_ffi_rustbuffer_reserve(RustBuffer buf, int32_t additional, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_continuation_callback_set(UniFfiRustFutureContinuation _Nonnull callback +); +void ffi_mopro_ffi_rust_future_poll_u8(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_u8(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_u8(void* _Nonnull handle +); +uint8_t ffi_mopro_ffi_rust_future_complete_u8(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_i8(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_i8(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_i8(void* _Nonnull handle +); +int8_t ffi_mopro_ffi_rust_future_complete_i8(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_u16(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_u16(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_u16(void* _Nonnull handle +); +uint16_t ffi_mopro_ffi_rust_future_complete_u16(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_i16(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_i16(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_i16(void* _Nonnull handle +); +int16_t ffi_mopro_ffi_rust_future_complete_i16(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_u32(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_u32(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_u32(void* _Nonnull handle +); +uint32_t ffi_mopro_ffi_rust_future_complete_u32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_i32(void* _Nonnull handle, void* _Nonnull uniffi_callback ); -int8_t uniffi_mopro_fn_func_verify_proof2(RustBuffer proof, RustBuffer public_input, RustCallStatus *_Nonnull out_status +void ffi_mopro_ffi_rust_future_cancel_i32(void* _Nonnull handle ); -RustBuffer ffi_mopro_rustbuffer_alloc(int32_t size, RustCallStatus *_Nonnull out_status +void ffi_mopro_ffi_rust_future_free_i32(void* _Nonnull handle ); -RustBuffer ffi_mopro_rustbuffer_from_bytes(ForeignBytes bytes, RustCallStatus *_Nonnull out_status +int32_t ffi_mopro_ffi_rust_future_complete_i32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status ); -void ffi_mopro_rustbuffer_free(RustBuffer buf, RustCallStatus *_Nonnull out_status +void ffi_mopro_ffi_rust_future_poll_u64(void* _Nonnull handle, void* _Nonnull uniffi_callback ); -RustBuffer ffi_mopro_rustbuffer_reserve(RustBuffer buf, int32_t additional, RustCallStatus *_Nonnull out_status +void ffi_mopro_ffi_rust_future_cancel_u64(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_u64(void* _Nonnull handle +); +uint64_t ffi_mopro_ffi_rust_future_complete_u64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_i64(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_i64(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_i64(void* _Nonnull handle +); +int64_t ffi_mopro_ffi_rust_future_complete_i64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_f32(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_f32(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_f32(void* _Nonnull handle +); +float ffi_mopro_ffi_rust_future_complete_f32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_f64(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_f64(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_f64(void* _Nonnull handle +); +double ffi_mopro_ffi_rust_future_complete_f64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_pointer(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_pointer(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_pointer(void* _Nonnull handle +); +void*_Nonnull ffi_mopro_ffi_rust_future_complete_pointer(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_rust_buffer(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_rust_buffer(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_rust_buffer(void* _Nonnull handle +); +RustBuffer ffi_mopro_ffi_rust_future_complete_rust_buffer(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +void ffi_mopro_ffi_rust_future_poll_void(void* _Nonnull handle, void* _Nonnull uniffi_callback +); +void ffi_mopro_ffi_rust_future_cancel_void(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_free_void(void* _Nonnull handle +); +void ffi_mopro_ffi_rust_future_complete_void(void* _Nonnull handle, RustCallStatus *_Nonnull out_status +); +uint16_t uniffi_mopro_ffi_checksum_func_add(void + ); -uint16_t uniffi_mopro_checksum_func_add(void +uint16_t uniffi_mopro_ffi_checksum_func_generate_proof2(void ); -uint16_t uniffi_mopro_checksum_func_hello(void +uint16_t uniffi_mopro_ffi_checksum_func_hello(void ); -uint16_t uniffi_mopro_checksum_func_initialize_mopro(void +uint16_t uniffi_mopro_ffi_checksum_func_initialize_mopro(void ); -uint16_t uniffi_mopro_checksum_func_generate_proof2(void +uint16_t uniffi_mopro_ffi_checksum_func_initialize_mopro_dylib(void ); -uint16_t uniffi_mopro_checksum_func_verify_proof2(void +uint16_t uniffi_mopro_ffi_checksum_func_verify_proof2(void ); -uint16_t uniffi_mopro_checksum_method_moprocircom_setup(void +uint16_t uniffi_mopro_ffi_checksum_method_moprocircom_generate_proof(void ); -uint16_t uniffi_mopro_checksum_method_moprocircom_generate_proof(void +uint16_t uniffi_mopro_ffi_checksum_method_moprocircom_setup(void ); -uint16_t uniffi_mopro_checksum_method_moprocircom_verify_proof(void +uint16_t uniffi_mopro_ffi_checksum_method_moprocircom_verify_proof(void ); -uint16_t uniffi_mopro_checksum_constructor_moprocircom_new(void +uint16_t uniffi_mopro_ffi_checksum_constructor_moprocircom_new(void ); -uint32_t ffi_mopro_uniffi_contract_version(void +uint32_t ffi_mopro_ffi_uniffi_contract_version(void );