mopro icon indicating copy to clipboard operation
mopro copied to clipboard

Feat/proc macro redesign

Open ElusAegis opened this issue 7 months ago • 15 comments

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.

ElusAegis avatar Jul 04 '24 23:07 ElusAegis