Noir Developer
Workflow
- 1. Compile (
nargo compile) Noir program into ACIR. - Generate witness (
nargo execute or NoirJS execute) based on ACIR and user inputs. - Prove using ACIR and witness with the selected proving backend.
- Verify proof with the selected proving backend.
Task Patterns
Environment
If the environment is unsupported by nargo (e.g. native Windows), guide the user to using GitHub Codespaces (https://noir-lang.org/docs/tooling/devcontainer#using-github-codespaces) or a supported setup (WSL, Docker, or VM).
Plan
Define private inputs, public inputs (if any), and public outputs (if any) for each Noir program.
Project Creation
When creating a Noir project, use nargo new or nargo init to scaffold it.
Compilation
Use nargo (not noir_wasm) for compilation; it is the maintained path.
Validation
Run nargo test to validate Noir implementations.
Proving Backend
Confirm the proving backend choice before implementation details. If the user selects Barretenberg, read references/barretenberg.md.
References
- - Run
nargo --help for the full list of commands. - Read https://noir-lang.org/docs/ for language syntax, dependencies, and tooling.
- Proving backends:
- For Barretenberg specifics, read
references/barretenberg.md.
Noir 开发者
工作流程
- 1. 编译(nargo compile):将 Noir 程序编译为 ACIR。
- 生成见证(nargo execute 或 NoirJS execute):基于 ACIR 和用户输入生成见证。
- 证明:使用 ACIR 和见证,通过选定的证明后端生成证明。
- 验证:使用选定的证明后端验证证明。
任务模式
环境
如果环境不受 nargo 支持(例如原生 Windows 系统),请引导用户使用 GitHub Codespaces(https://noir-lang.org/docs/tooling/devcontainer#using-github-codespaces)或受支持的配置(WSL、Docker 或虚拟机)。
规划
为每个 Noir 程序定义私有输入、公共输入(如有)和公共输出(如有)。
项目创建
创建 Noir 项目时,使用 nargo new 或 nargo init 来搭建项目框架。
编译
使用 nargo(而非 noir_wasm)进行编译;这是受维护的路径。
验证
运行 nargo test 来验证 Noir 实现。
证明后端
在实现细节之前,先确认证明后端的选择。如果用户选择 Barretenberg,请阅读 references/barretenberg.md。
参考资料
- - 运行 nargo --help 查看完整命令列表。
- 阅读 https://noir-lang.org/docs/ 了解语言语法、依赖项和工具。
- 证明后端:
- 有关 Barretenberg 的具体信息,请阅读 references/barretenberg.md。