Ensure Circom 1 tests pass with experimental Circom 2 support (#18)

* All tests pass under circom-2 feature flag

- Check for version in WASM, default to version 1
- Include Circom1 when Circom 2 feature flag is enabled

Currently a lot of code duplication. Once Circom-2 is more stable and
proven to work in the wild, feature flag can be removed.

* Separate Circom 1 and Circom2 witness calculation

* Cleanup

* WitnessCalculator helpers for Circom 1 and 2

Also make helper fn private

* Move comment

* Fix expression return

* cargo fmt

* Add cargo test circom-2 to ci
This commit is contained in:
oskarth
2022-01-13 19:30:00 +08:00
committed by GitHub
parent 1732e15d63
commit 1a383b6260
5 changed files with 200 additions and 77 deletions

View File

@@ -44,6 +44,11 @@ jobs:
export PATH=$HOME/bin:$PATH
cargo test
- name: cargo test circom 2 feature flag
run: |
export PATH=$HOME/bin:$PATH
cargo test --features circom-2
lint:
runs-on: ubuntu-latest
steps: