From the primitives crate chater.
Core foundational types and structures for the World ID Protocol. Importantly, this crate keeps dependencies to a minimum and does not implement any logic beyond serialization and deserialization.
At this point the crate has become too bloated and has too many dependencies to be simply types and structures. Looking into optimizing this will be quite beneficial as there are multiple consumers of this. Beyond the initial step of analyzing which deps are contributing the most and getting creative about removing them, outlining some ideas below.
- We're mixing logic in this crate. For example, compressing and uncompressing proofs should probably go in the proof crate, or serializing circuit inputs into Groth16 inputs.
- There are many crates dedicated to exposing types for Circom proofs (e.g.
groth16-material, circom-types, taceo-groth16-sol, ...). We could look into restructuring these deps so that only basic typed structures are imported. May require upstream dep updates.
- Signing logic should probably not be in primitives. Remove most of alloy dependencies and import them in the crates that need the actual signing logic.
- We're using sha3 for a sponge construction of arbitrary bytes into the field. Likely using an existing dep is enough.
From the primitives crate chater.
At this point the crate has become too bloated and has too many dependencies to be simply types and structures. Looking into optimizing this will be quite beneficial as there are multiple consumers of this. Beyond the initial step of analyzing which deps are contributing the most and getting creative about removing them, outlining some ideas below.
groth16-material,circom-types,taceo-groth16-sol, ...). We could look into restructuring these deps so that only basic typed structures are imported. May require upstream dep updates.