mirror of
https://github.com/arnaucube/circom.git
synced 2026-02-07 11:16:42 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a18b603b22 | ||
|
|
f261992689 | ||
|
|
45e359aa35 | ||
|
|
da6cff2335 |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "circom",
|
"name": "circom",
|
||||||
"version": "0.5.1",
|
"version": "0.5.3",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "circom",
|
"name": "circom",
|
||||||
"version": "0.5.1",
|
"version": "0.5.3",
|
||||||
"description": "Language to generate logic circuits",
|
"description": "Language to generate logic circuits",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
@@ -34,11 +34,11 @@
|
|||||||
"circom_runtime": "0.0.3",
|
"circom_runtime": "0.0.3",
|
||||||
"ffiasm": "0.0.2",
|
"ffiasm": "0.0.2",
|
||||||
"ffjavascript": "0.0.3",
|
"ffjavascript": "0.0.3",
|
||||||
"ffwasm": "0.0.5",
|
"ffwasm": "0.0.6",
|
||||||
"fnv-plus": "^1.3.1",
|
"fnv-plus": "^1.3.1",
|
||||||
"r1csfile": "0.0.2",
|
"r1csfile": "0.0.3",
|
||||||
"tmp-promise": "^2.0.2",
|
"tmp-promise": "^2.0.2",
|
||||||
"wasmbuilder": "0.0.9"
|
"wasmbuilder": "0.0.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ async function c_tester(circomFile, _options) {
|
|||||||
);
|
);
|
||||||
} else throw("Unsupported platform");
|
} else throw("Unsupported platform");
|
||||||
|
|
||||||
const cdir = path.join(__dirname, "..", "..", "node_modules", "circom_runtime", "c");
|
const cdir = path.join(path.dirname(require.resolve("circom_runtime")), "c");
|
||||||
|
|
||||||
await exec("g++" +
|
await exec("g++" +
|
||||||
` ${path.join(cdir, "main.cpp")}` +
|
` ${path.join(cdir, "main.cpp")}` +
|
||||||
|
|||||||
@@ -103,7 +103,11 @@ async function buildR1cs(ctx, fileName) {
|
|||||||
|
|
||||||
async function writeU64(v, pos) {
|
async function writeU64(v, pos) {
|
||||||
const b = Buffer.allocUnsafe(8);
|
const b = Buffer.allocUnsafe(8);
|
||||||
b.writeBigUInt64LE(BigInt(v));
|
|
||||||
|
const LSB = v & 0xFFFFFFFF;
|
||||||
|
const MSB = Math.floor(v / 0x100000000);
|
||||||
|
b.writeInt32LE(LSB, 0);
|
||||||
|
b.writeInt32LE(MSB, 4);
|
||||||
|
|
||||||
await fd.write(b, 0, 8, pos);
|
await fd.write(b, 0, 8, pos);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user