zkmopro / mopro

Making client-side proving on mobile simple.
Apache License 2.0
102 stars 28 forks source link

(feat)core: Circom feature for `mopro-core` #172

Closed ElusAegis closed 1 week ago

ElusAegis commented 1 week ago

Introduced circom and circom-default features for mopro-core

Before mopro-core had a Halo2 feature to turn on the Halo2 adapter, however, there was no way to turn off the Circom adapter, and because of circom dependencies Halo2 compilation took longer

This PR:

  1. Adds a circom feature and adjusts Cargo.toml to make sure that all circom related features and dependencies require this feature to be on.
  2. Adds a circom-deafult feature for a default circom configuration with wasmer/dylib. This is a default feature for mopro-core
  3. Updates the build.rs to make use of the features:
    • Make sure that circom and halo2 are mutually exclusive features
    • Move the circom related functions to circom modules inside build.rs, likewise for halo2 related functions
      1. Update mod.rs to make use of the new circom feature.