vamp-ir is used as a library in the taiga product. It will be used to compile and execute circuits provided from user input in transactions. Both the vamp-ir code for a circuit and its inputs will be fields on some transaction data structure rather than files in the file-system.
It would be convenient to have a vamp-ir compile API to support this use case.
As a starting off point for discussion let's consider:
This could be made generic on the PrimeField (and module type? - not sure I don't know rust well).
requirements / questions / comments:
The new API should not panic for errors we'd like to log/report, e.g parsing errors or invalid assignment errors should be captured in the VampIRError type.
vamp-ir is used as a library in the taiga product. It will be used to compile and execute circuits provided from user input in transactions. Both the vamp-ir code for a circuit and its inputs will be fields on some transaction data structure rather than files in the file-system.
It would be convenient to have a vamp-ir compile API to support this use case.
As a starting off point for discussion let's consider:
This could be made generic on the PrimeField (and module type? - not sure I don't know rust well).
requirements / questions / comments:
VampIRError
type.&str
for the input source? Like a reader type that can support files and bytes?from_vamp_ir_source
I'm proposing in taiga https://github.com/anoma/taiga/blob/aa80600f8e4f6c19bc3e75b812f3b9f615e51bcf/taiga_halo2/src/circuit/vp_circuit.rs#L513