Browse Source

Add optimization options

fix/check-version
Jordi Baylina 3 years ago
parent
commit
020cb4d510
No known key found for this signature in database GPG Key ID: 7480C80C1BE43112
2 changed files with 6 additions and 2 deletions
  1. +3
    -1
      c/tester.js
  2. +3
    -1
      wasm/tester.js

+ 3
- 1
c/tester.js

@ -46,7 +46,9 @@ async function compile (baseName, fileName, options) {
if (options.r1cs) flags += "--r1cs "; if (options.r1cs) flags += "--r1cs ";
if (options.json) flags += "--json "; if (options.json) flags += "--json ";
if (options.output) flags += "--output " + options.output + " "; if (options.output) flags += "--output " + options.output + " ";
if (options.O === 0) flags += "--O0 "
if (options.O === 1) flags += "--O1 "
b = await exec("circom " + flags + fileName); b = await exec("circom " + flags + fileName);
assert(b.stderr == "", assert(b.stderr == "",
"circom compiler error \n" + b.stderr); "circom compiler error \n" + b.stderr);

+ 3
- 1
wasm/tester.js

@ -51,7 +51,9 @@ async function compile (fileName, options) {
if (options.r1cs) flags += "--r1cs "; if (options.r1cs) flags += "--r1cs ";
if (options.json) flags += "--json "; if (options.json) flags += "--json ";
if (options.output) flags += "--output " + options.output + " "; if (options.output) flags += "--output " + options.output + " ";
if (options.O === 0) flags += "--O0 "
if (options.O === 1) flags += "--O1 "
b = await exec("circom " + flags + fileName); b = await exec("circom " + flags + fileName);
assert(b.stderr == "", assert(b.stderr == "",
"circom compiler error \n" + b.stderr); "circom compiler error \n" + b.stderr);

Loading…
Cancel
Save