Make type/dep discovery, and use, easier
tl;dr - add types (and maybe other crates) from noir-protocol-circuits to docs. Either in its Reference section, or like this.
For devs to look up types, and where they're included from, they can:
- Trace through and copy existing code
usestatements and corresponding Nargo.toml[dependencies], or, - Find/navigate definitions from the monorepo source
- ~Look up an auto-generated doc reference~ (needed)
Point 1. is okay for copying examples, but not for understanding and context Point 2. the latter is not always clear given the location of different types, and needing to search the monorepo
Eg see ValueNote:
Nargo.toml -
aztec = {
git="https://github.com/AztecProtocol/aztec-packages/",
tag="aztec-package-v0.33.0",
directory="noir-projects/aztec-nr/value-note"
}
main.nr - use dep::value_note::value_note::ValueNote;
Location - noir-projects/aztec-nr/value-note/src/value_note.nr
Compared to FunctionSelector:
Nargo.toml -
aztec = {
git="https://github.com/AztecProtocol/aztec-packages/",
tag="aztec-package-v0.33.0",
directory="noir-projects/aztec-nr/aztec"
}
main.nr - use dep::aztec::protocol_types::abis::function_selector::FunctionSelector
Location - noir-projects/noir-protocol-circuits/crates/types/src/abis
@jzaki do you think this issue is still relevant?
This recently surfaced in a solid question from a power-dev, asking for an example of non-inclusion proof (implemented in noir-protocol-circuits) I think this is still good to have on the list.