Almost ready for 0.5.0

This commit is contained in:
Jordi Baylina
2020-03-26 17:42:25 +01:00
parent ef899e618b
commit eb8cb0af74
62 changed files with 1249 additions and 15153 deletions

8
cli.js
View File

@@ -23,6 +23,7 @@
const fs = require("fs");
const path = require("path");
const bigInt = require("big-integer");
const compiler = require("./src/compiler");
@@ -37,6 +38,7 @@ const argv = require("yargs")
.alias("t", "wat")
.alias("s", "sym")
.alias("r", "r1cs")
.alias("p", "prime")
.alias("n", "newThreadTemplates")
.help("h")
.alias("h", "help")
@@ -50,10 +52,6 @@ const argv = require("yargs")
type: "boolean",
description: "Do not optimize constraints"
})
.option("sanityCheck", {
type: "boolean",
description: "Add sanity check code"
})
.epilogue(`Copyright (C) 2018 0kims association
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
@@ -84,6 +82,8 @@ const options = {};
options.reduceConstraints = !argv.fast;
options.verbose = argv.verbose || false;
options.sanityCheck = argv.sanitycheck;
options.prime = argv.prime || bigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617");
if (argv.csource) {
options.cSourceWriteStream = fs.createWriteStream(cSourceName);
}