Closed AndriianChestnykh closed 2 years ago
Thanks for the proposal. I like it, but I would prefer to have "basePath" and "recompile" as direct options instead of being part of outputOptions. I'll adapt it this way and merge it. I'll also include them for the tester for C.
Thanks for the proposal. I like it, but I would prefer to have "basePath" and "recompile" as direct options instead of being part of outputOptions. I'll adapt it this way and merge it. I'll also include them for the tester for C.
Perfect! Let me know if you need any help to complete it.
Now it should be used like this circuit = await tester( path.join(dirname, "circuits", "someCircuit.circom"), { output: path.join(dirname, "build"), recompile: false, }, ); and it checks if the needed folders exist and produce an exception if they don't and recompile is set to false. If this works for you as expected I'll merge it and change the tester for C accordingly.
Thanks, @alrubio. I'll check it later this week and let you know.
@alrubio, it looks good for me. As a minor improvement I would prefer to keep all the artifacts specific for the compilation under a separate folder. A folder can be named automatically after the *.circom file name which is being compiled
I think you can get the effect you want by calling with output: path.join(__dirname, "build/circuitName"), so I prefer to leave it as it is now. If you have no further comment I will merge it and close the PR.
Sure, please merge the PR.
This is to enable optional re-compilation for tests as opposed to current mandatory compilation. It may save some time when only inputs but not circuits are changed between test runs.
This PR introduces additional options property object:
It is backward compatible with existing tests
Example:
Note: This PR as of its being initially open does add this options only for WASM tester but not for C tester. But I can add it for C as well if get a positive feedback.