Currently @aztec/noir-compiler with the wasm backend supports compiling individual contracts. In order to achieve equivalence with Nargo it should support workspaces as well.
Until the wasm backend gets support for workspaces, we could either
- build each contract sequentially (this could take a long time in big workspaces)
- use worker threads or child processes to build contracts in parallel
There are two reasons we'd have to parallelize like this:
- the wasm compilation relies on global state (
initializeResolver) so it can't be changed while a contract is being compiled
- running the wasm 'blocks' the event loop.
Original discussion: #2737 (comment)
Currently
@aztec/noir-compilerwith the wasm backend supports compiling individual contracts. In order to achieve equivalence with Nargo it should support workspaces as well.Until the wasm backend gets support for workspaces, we could either
There are two reasons we'd have to parallelize like this:
initializeResolver) so it can't be changed while a contract is being compiledOriginal discussion: #2737 (comment)