mopro
mopro copied to clipboard
Feat/proc macro redesign
This PR explores how Mopro could look if we adopt UniFFI Procedural Macros instead of using UDL files, which allows us to dynamically generate functions and objects that can be exported to target architectures.
For example, this allows the user to instead of working with generic functions verify_circom_proof
have for each circuit a custom object KeccakCircomCircuit
and use it as KeccakCircomCircuit.prove(...)
or KeccakCircomCircuit.verify(...)
making sure each circuit is explicit when used, allowing circuits to store internal state, and making it easy to work with multiple circuits of different types.
Furthermore, for Halo2
and other library-style proving systems, as well as for advanced users, this allows them to override or provide custom implementations of underlying circuit logic, while mopro only handles the wrapping of this logic in uniffi
and compilation of them to target platforms.