mirror of https://github.com/vacp2p/zerokit.git
Minimal FFI example for C and Nim
This commit is contained in:
parent
fb81e32977
commit
cc4cf11583
|
@ -2,3 +2,12 @@
|
|||
|
||||
Example wrapper around a basic Circom circuit to test Circom 2 integration
|
||||
through ark-circom and FFI.
|
||||
|
||||
# FFI
|
||||
|
||||
To generate C or Nim bindings from Rust FFI, use `cbindgen` or `nbindgen`:
|
||||
|
||||
```
|
||||
cbindgen . -o target/multiplier.h
|
||||
nbindgen . -o target/multiplier.nim
|
||||
```
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// Rust FFI
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn foobar() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
// prove
|
||||
// verify
|
||||
// params?
|
|
@ -0,0 +1 @@
|
|||
pub mod ffi;
|
Loading…
Reference in New Issue