Skip to content

Commit

Permalink
Merge pull request #74 from numtel/circomPath_config
Browse files Browse the repository at this point in the history
Add circomPath configuration parameter
  • Loading branch information
erhant authored Apr 23, 2024
2 parents 3db92f1 + 7c09a4a commit 1fe25b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/circomkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export class Circomkit {
// call `circom` as a sub-process
try {
const result = await new Promise<{stdout: string; stderr: string}>((resolve, reject) => {
exec(`circom ${flags} ${targetPath}`, (error, stdout, stderr) => {
exec(`${this.config.circomPath} ${flags} ${targetPath}`, (error, stdout, stderr) => {
if (error === null) {
resolve({stdout, stderr});
} else {
Expand Down
2 changes: 2 additions & 0 deletions src/types/circomkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export type CircomkitConfig = {
dirPtau: string;
/** Directory to output circuit build files. */
dirBuild: string;
/** Path to circom executable */
circomPath: string;
/** Number of contributions */
groth16numContributions: number;
/** Ask user input to create entropy */
Expand Down
1 change: 1 addition & 0 deletions src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const defaultConfig: Readonly<CircomkitConfig> = Object.seal({
dirCircuits: './circuits',
dirInputs: './inputs',
dirBuild: './build',
circomPath: 'circom',
// compiler-specific
optimization: 1,
inspect: true,
Expand Down

0 comments on commit 1fe25b3

Please sign in to comment.