-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Description
The instructions in both the tutorial and README are wrong as of circom 0.5.38.
Environment Information
$ uname --all
Linux foobar 5.8.0-43-generic #49~20.04.1-Ubuntu SMP Fri Feb 5 09:57:56 UTC 2021 x86_64 x86_64 GNU/Linux
$ yarn run circom --version
yarn run v1.22.5
warning package.json: No license field
$ /home/someuser/dev/misc/node_modules/.bin/circom --version
0.5.38
Done in 0.20s.Steps to Reproduce
$ mkdir myproj
$ cd myproj
$ yarn add circom
$ yarn add snarkjs
$ mkdir factor
$ cd factor
$ vim circuit.circom # fill in the file...
$ yarn run circom
yarn run v1.22.5
warning package.json: No license field
$ /home/someuser/dev/misc/node_modules/.bin/circom
Error: ENOENT: no such file or directory, open '/home/someuser/dev/misc/circuit.circom'
at Object.openSync (fs.js:466:3)
at Object.readFileSync (fs.js:369:35)
at constructionPhase (/home/someuser/dev/misc/node_modules/circom/src/construction_phase.js:78:20)
at compile (/home/someuser/dev/misc/node_modules/circom/src/compiler.js:70:5)
at run (/home/someuser/dev/misc/node_modules/circom/cli.js:120:11)
at Object.<anonymous> (/home/someuser/dev/misc/node_modules/circom/cli.js:145:1)
at Module._compile (internal/modules/cjs/loader.js:1085:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:791:14)
ENOENT: no such file or directory, open '/home/someuser/dev/misc/circuit.circom'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ cd ..
$ yarn run circom factor/circuit.circom
yarn run v1.22.5
warning package.json: No license field
$ /home/someuser/dev/misc/node_modules/.bin/circom factor/circuit.circom
Done in 0.23s.Additionally, the command-line flags used in the tutorial aren't even documented in the usage information:
$ yarn run circom --help
yarn run v1.22.5
warning package.json: No license field
$ /home/someuser/dev/misc/node_modules/.bin/circom --help
circom [input source circuit file] -r [output r1cs file] -c [output c file] -w
[output wasm file] -t [output wat file] -s [output sym file]
Options:
--version Show version number [boolean]
-h, --help Show help [boolean]
--verbose, -v Run with verbose logging [boolean]
--fast, -f Do not optimize constraints [boolean]
Copyright (C) 2018 0kims association
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions; see the COPYING file in the official
repo directory at https://github.com/iden3/circom
Done in 0.23s.Expected Behaviour
For the tutorial documentation to be correct and to work on the latest stable release.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels