-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(compile): compile w/dependencies and options #965
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of the multiple return value types (single program vs an array of programs) but I don't think it's a blocker.
What's the alternative you're thinking about? Perhaps having overloaded method? I was going for party with CLI first. |
My preference is to have separated logic for compiling contracts vs single programs which is then reusable here.
Yep, it matching our implementation in the CLI is why I'm fine with this going through. We can refactor later as we define the compilation code-paths for programs/contracts more. That said I think that having multiple "return types" is a bit different when writing to the FS rather than passing values back to code. |
Agreed, this is still WIP to be addressed. |
Related issue(s)
#952 Allow compilation with dependencies from WASM, #888 (comment)
Resolves #952 Allow compilation with dependencies from WASM
Description
Allows to call
compile
with a set of dependencies as a second argument. Those dependencies will be later resolved from noir-lang/noir-source-resolverSummary of changes
crates/wasm/src/lib.rs adds the additional argument which will be iterated over to resolves dependencies. It's equivalent to declaring it in project configuration.
Note: Usage example is demonstrated here
https://github.com/noir-lang/noir-cra/blob/master/src/compile_prove_verify.js#L50
Dependency additions / changes
noirc_driver
is now required bywasm
Test additions / changes
N/A
Checklist
cargo fmt
with default settings.Documentation needs
Additional context