mirror of
https://github.com/arnaucube/circom_tester.git
synced 2026-02-07 11:26:41 +01:00
Compare commits
3 Commits
v0.0.6
...
fix/check-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89bcaf436e | ||
|
|
15ddd2a0be | ||
|
|
020cb4d510 |
@@ -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);
|
||||||
@@ -200,7 +202,7 @@ function check_versions ( v1, v2 ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function compiler_above_version(v) {
|
async function compiler_above_version(v) {
|
||||||
let output = await exec('circom --version').toString();
|
let output = (await exec('circom --version')).stdout;
|
||||||
let compiler_version = version_to_list(output.slice(output.search(/\d/),-1));
|
let compiler_version = version_to_list(output.slice(output.search(/\d/),-1));
|
||||||
vlist = version_to_list(v);
|
vlist = version_to_list(v);
|
||||||
return check_versions ( compiler_version, vlist );
|
return check_versions ( compiler_version, vlist );
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "circom_tester",
|
"name": "circom_tester",
|
||||||
"version": "0.0.6",
|
"version": "0.0.7",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "circom_tester",
|
"name": "circom_tester",
|
||||||
"version": "0.0.6",
|
"version": "0.0.7",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chai": "^4.3.4",
|
"chai": "^4.3.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "circom_tester",
|
"name": "circom_tester",
|
||||||
"version": "0.0.6",
|
"version": "0.0.7",
|
||||||
"description": "Tools for testing circom circuits.",
|
"description": "Tools for testing circom circuits.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -191,7 +193,7 @@ function check_versions ( v1, v2 ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function compiler_above_version(v) {
|
async function compiler_above_version(v) {
|
||||||
let output = await exec('circom --version').toString();
|
let output = (await exec('circom --version')).stdout;
|
||||||
let compiler_version = version_to_list(output.slice(output.search(/\d/),-1));
|
let compiler_version = version_to_list(output.slice(output.search(/\d/),-1));
|
||||||
vlist = version_to_list(v);
|
vlist = version_to_list(v);
|
||||||
return check_versions ( compiler_version, vlist );
|
return check_versions ( compiler_version, vlist );
|
||||||
|
|||||||
Reference in New Issue
Block a user