|
|
|
@ -124,7 +124,7 @@ export class CircomPluginClient extends PluginClient { |
|
|
|
|
async compile(path: string, compilationConfig?: CompilationConfig): Promise<void> { |
|
|
|
|
this.internalEvents.emit('circuit_compiling_start') |
|
|
|
|
// @ts-ignore
|
|
|
|
|
this.call('terminal', 'log', { type: 'info', value: 'Compiling ' + path }) |
|
|
|
|
this.call('terminal', 'log', { type: 'log', value: 'Compiling ' + path }) |
|
|
|
|
const [parseErrors, filePathToId] = await this.parse(path) |
|
|
|
|
|
|
|
|
|
if (parseErrors && (parseErrors.length > 0)) { |
|
|
|
@ -172,7 +172,6 @@ export class CircomPluginClient extends PluginClient { |
|
|
|
|
} else { |
|
|
|
|
this.internalEvents.emit('circuit_compiling_done', []) |
|
|
|
|
} |
|
|
|
|
// @ts-ignore
|
|
|
|
|
circuitApi.log().map(log => { |
|
|
|
|
log && this.call('terminal', 'log', { type: 'log', value: log })
|
|
|
|
|
}) |
|
|
|
@ -184,7 +183,7 @@ export class CircomPluginClient extends PluginClient { |
|
|
|
|
async generateR1cs (path: string, compilationConfig?: CompilationConfig): Promise<void> { |
|
|
|
|
this.internalEvents.emit('circuit_generating_r1cs_start') |
|
|
|
|
// @ts-ignore
|
|
|
|
|
this.call('terminal', 'log', { type: 'info', value: 'Generating R1CS for ' + path }) |
|
|
|
|
this.call('terminal', 'log', { type: 'log', value: 'Generating R1CS for ' + path }) |
|
|
|
|
const [parseErrors, filePathToId] = await this.parse(path) |
|
|
|
|
|
|
|
|
|
if (parseErrors && (parseErrors.length > 0)) { |
|
|
|
@ -221,7 +220,6 @@ export class CircomPluginClient extends PluginClient { |
|
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
await this.call('fileManager', 'writeFile', writePath, r1csProgram, true) |
|
|
|
|
// @ts-ignore
|
|
|
|
|
r1csApi.log().map(log => { |
|
|
|
|
log && this.call('terminal', 'log', { type: 'log', value: log })
|
|
|
|
|
}) |
|
|
|
|