Refactor stdlib into a separate noir library#443
Refactor stdlib into a separate noir library#443kevaundray merged 5 commits intonoir-lang:masterfrom
Conversation
* Remove std_lib package * Update path_to_stdlib Given that now the stdlib is a standalone nargo crate * Copy stdlib nargo crate to the native config dir * Move stdlib to the package manager level As a standalone nargo crate * Add build.rs dependencies * Return aztec_backend dependency back to its origin commit as it was modified accidentally. * Abstract driver module from the stdlib addition Now the stdlib addition is a responsibility for nargo. Note: It needs to add it before invoking into_compiled_program in order for the resolver to find the stdlib as a dependency of the crate. * cargo fmt * Change needless pass value This argument was passed by value, but not consumed in the function body * Update file_compiles for tests * Move tests to the package manager level as well * Add tests for the build cmd To ensure that the changes made work as expected
kevaundray
left a comment
There was a problem hiding this comment.
LGTM. Just a few comments on creating tracking issues for some TODOs
guipublic
left a comment
There was a problem hiding this comment.
I don't understand the purpose of this PR, and in particular having the std_lib not been a standalone crate anymore does not seem a good move to me.
We had an internal discussion and what I got from it is that the purpose of the PR is to removing dependency on the rust compiler for the std::lib, so that we do not need additional installation steps for instance. |
Great! Let me know if more changes are needed, I'll be glad to make them. |
…493) Co-authored-by: Koby <koby@aztecprotocol.com>
…496) Co-authored-by: Koby <koby@aztecprotocol.com>
* master: Array sort (noir-lang#477) Add `--allow-warnings` flag to treat certain errors as warnings (noir-lang#481) Improve field comparison error message (noir-lang#499) Disable debug output during integration tests (noir-lang#494) Aligns build to (noir-lang#443) Refactor stdlib into a separate noir library (noir-lang#496)
Related issue(s)
Resolves #423
Description
Summary of changes
This PR abstracts the driver from the stdlib addition and moves the stdlib as a standalone nargo crate to the package manager level and when nargo is installed it is copied to the native config dir for the driver to look up to when adding it as an implicit dependency when crating a new project.
Dependency additions / changes
dirsis added as abuild-dependencyinnargo.Checklist
cargo fmtwith default settings.Additional context
N/A