new features to make ark-circom slimmer (#45)

* new features

* fmt

* update wasm feature

* revert

* update

---------

Co-authored-by: tyshkor <tyshko1@gmail.com>
This commit is contained in:
tyshko-rostyslav 2023-03-20 19:47:32 +01:00 committed by GitHub
parent b892c62597
commit f97ac2b245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

1
Cargo.lock generated
View File

@ -3740,6 +3740,7 @@ dependencies = [
"wasmer-engine-universal",
"wasmer-types",
"wasmer-vm",
"wasmparser",
"wat",
"winapi",
]

View File

@ -3,9 +3,12 @@ name = "ark-circom"
version = "0.1.0"
edition = "2018"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
# WASM operations
wasmer = { version = "2.0" }
wasmer = { version = "2.0", default-features = false }
fnv = { version = "1.0.3", default-features = false }
num = { version = "0.4.0" }
num-traits = { version = "0.2.0", default-features = false }
@ -17,7 +20,7 @@ ark-ec = { version = "0.4.1", default-features = false, features = ["parallel"]
ark-ff = { version = "0.4.1", default-features = false, features = ["parallel", "asm"] }
ark-std = { version = "0.4.0", default-features = false, features = ["parallel"] }
ark-bn254 = { version = "0.4.0" }
ark-groth16 = { version = "0.4.0", features = ["parallel"] }
ark-groth16 = { version = "0.4.0", default-features = false, features = ["parallel"] }
ark-poly = { version = "0.4.1", default-features = false, features = ["parallel"] }
ark-relations = { version = "0.4.0", default-features = false }
ark-serialize = { version = "0.4.1", default-features = false }
@ -47,7 +50,8 @@ name = "groth16"
harness = false
[features]
default = ["wasmer/default", "circom-2", "ethereum"]
wasm = ["wasmer/js-default"]
bench-complex-all = []
circom-2 = []
ethereum = ["ethers-core"]
default = ["circom-2", "ethereum"]

View File

@ -482,7 +482,8 @@ mod tests {
let n_vars = 10;
let buf = vec![g1_buf(); n_vars]
.iter()
.flatten().cloned()
.flatten()
.cloned()
.collect::<Vec<_>>();
let expected = vec![g1_one(); n_vars];
@ -505,7 +506,8 @@ mod tests {
let n_vars = 10;
let buf = vec![g2_buf(); n_vars]
.iter()
.flatten().cloned()
.flatten()
.cloned()
.collect::<Vec<_>>();
let expected = vec![g2_one(); n_vars];