Skip to content
zkInterface is a protocol for the interoperability of zero-knowledge frameworks.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

ZK Gadget Standard Interface

zkInterface is a standard tool for zero-knowledge interoperability.

The spec can be found here.

zkInterface.pdf The interface specification
zkinterface.fbs The gadget interface definition using FlatBuffers
rust/src/ Generated Rust code
rust/src/ Example gadget call in Rust
cpp/zkinterface_generated.h Generated C++ code
cpp/gadget_example.cpp Example gadget in C++ Generate Rust and C++ code from zkinterface.fbs, and compile the C++ example
cpp/libsnark_integration.hpp Libsnark support
cpp/libsnark_example.cpp Libsnark gadget example


In the rust directory:

cargo test

This will generate and compile Rust and C++ code, and run a test of both sides communicating through the standard interface.

Generated code

Generated C++ and Rust code is included.

For other languages, install the FlatBuffers code generator (flatc). One way is to compile it with the following:

git clone
cd flatbuffers
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release

Then run: flatc --LANGUAGE zkinterface.fbs

You can’t perform that action at this time.