arkworks-rs / crypto-primitives

Interfaces and implementations of cryptographic primitives, along with R1CS constraints for them
https://www.arkworks.rs
Apache License 2.0
165 stars 79 forks source link

Add `#[proc_macro_derive(Absorb)]` on custom structs #133

Closed mmagician closed 7 months ago

mmagician commented 7 months ago

So that we can write:

#[dervice(Absorb)]
struct MyStruct {
    a: u8,
    b: u8,
}

What do you think? Happy to take it on

Pratyush commented 7 months ago

That would be great!

Would also be great for traits in r1cs-std, like AllocVar, R1CSVar, EqGadget, CmpGadget, etc.