Skip to content

Refactor stdlib into a separate noir library#1

Merged
ilitteri merged 12 commits intomasterfrom
refactor_noir_std_lib
Nov 5, 2022
Merged

Refactor stdlib into a separate noir library#1
ilitteri merged 12 commits intomasterfrom
refactor_noir_std_lib

Conversation

@ilitteri
Copy link
Collaborator

@ilitteri ilitteri commented Nov 3, 2022

Related issue(s)

Resolves (link to issue) (TODO)

Description

Summary of changes

This PR 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 doing nargo build in your project.

Dependency additions / changes

dirs is added as a build-dependency in nargo.

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Additional context

For installing nargo follow these instructions.

@ilitteri ilitteri self-assigned this Nov 3, 2022
@ilitteri ilitteri marked this pull request as ready for review November 3, 2022 17:26
Iván Litteri added 6 commits November 4, 2022 10:16
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.
This argument was passed by value, but not consumed in the function body
To ensure that the changes made work as expected
@ilitteri ilitteri merged commit 80ef02e into master Nov 5, 2022
@ilitteri ilitteri deleted the refactor_noir_std_lib branch November 5, 2022 13:00
ilitteri added a commit that referenced this pull request Dec 20, 2022
* Refactor stdlib into a separate noir library (#1)

* 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

* cargo fmt

* Move the stdlib to the top level (#2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants