3 releases
new 0.1.1 | Feb 14, 2025 |
---|---|
0.1.1-alpha.1 |
|
0.1.1-alpha.0 | Feb 6, 2025 |
0.1.0 | Jul 26, 2024 |
#12 in #proving
135 downloads per month
77KB
1.5K
SLoC
Mopro FFI
mopro-ffi
is a tool designed to assist programmable cryptography application or rust application developers in efficiently creating bindings for client-side targets.
Key features include:
- Function Serialization and Export: Enables serialization and export of functions within each proving system. To generate FFI bindings for different targets, inputs and outputs must conform to the specific types defined in uniffi.
- Supported proving systems:
circom
,halo2
.
- Supported proving systems:
- Executable Binaries: Provides pre-built binaries, allowing developers to generate bindings for various targets effortlessly.
- Supported targets:
swift
,kotlin
.
- Supported targets:
- Customize Exported Functions: Supports the ability to customize the exported functions. Users can define the functions in the
src/mopro.udl
file.
Usage
- Please check the Manual Setup for Android/iOS Bindings for integrating
mopro-ffi
into your project.
Usage for general Rust application
-
Integrate the
mopro-ffi
like the above tutorial. -
Update the
src/mopro.udl
file to add the functions you want to export. Check out how to define the functions in UDL file: UniFFI: The UDL file- E.g.
export Rust function like
and define the function in the UDL file like:pub fn hello_world() -> String { "Hello World!".to_string() }
namespace mopro { // ... string hello_world(); }
- E.g.
export Rust function like
-
Run
cargo run --bin ios
orcargo run --bin android
again.
Community
- X account:
- Telegram group:
- Mopro Documentation: https://zkmopro.org
Acknowledgements
This work was initially sponsored by a joint grant from PSE and 0xPARC. It is currently incubated by PSE.
Dependencies
~10–20MB
~282K SLoC