Skip to content
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

Ability for a Noir program to choose to use it's nearest Nargo.toml file #6671

Closed
jzaki opened this issue Dec 2, 2024 · 2 comments
Closed
Labels
enhancement New feature or request nargo Noir's CLI development tool

Comments

@jzaki
Copy link
Contributor

jzaki commented Dec 2, 2024

Problem

A lib has a Nargo.toml file in the root, any supplementary circuits in sub-directories (eg benchmarking and examples beyond atomic tests) also have their Nargo.toml file.

For these subdirectories to be compiled, the lib would have to be aware of the contents of the subdirectories.
Ideally they would be associated with the lib and be updated if the lib changes, but sufficiently decoupled so that the lib needn't be aware of ancillary sub-directories.

Happy Case

The ability to indicate to nargo to not search for a Nargo.toml file beyond the one in the current directory, or specify where to find the nargo file.

nargo compile --nargo-path .

Workaround

Yes

Workaround Description

Keep examples/benchmarking manually in sync with lib whether in lib repo or separate.

Additional Context

Cargo searches up parent paths until the first Cargo.toml file it finds, Nargo ascends to the top-most Nargo.toml file

Project Impact

None

Blocker Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@jzaki jzaki added the enhancement New feature or request label Dec 2, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Dec 2, 2024
@Savio-Sou Savio-Sou added the nargo Noir's CLI development tool label Dec 5, 2024
@TomAFrench
Copy link
Member

We wanting to change this so that we don't keep traversing up to the highest nargo.toml file but this isn't considered a high priority ATM.

See #2606

@TomAFrench
Copy link
Member

You mention this is going to be used for example and benchmarking. I don't think it's good practice for examples to be created a separate binaries, these should be created as tests.

We also have a workflow for benchmarking that allows the benchmarks functions to be placed within the library. noir-lang/noir-library-starter#7

@jzaki jzaki closed this as completed Dec 12, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nargo Noir's CLI development tool
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants