noir-developer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Noir Developer

Noir 开发者

Workflow

工作流程

  1. Compile (
    nargo compile
    ) Noir program into ACIR.
  2. Generate witness (
    nargo execute
    or NoirJS execute) based on ACIR and user inputs.
  3. Prove using ACIR and witness with the selected proving backend.
  4. Verify proof with the selected proving backend.
  1. 编译(
    nargo compile
    )Noir程序为ACIR格式。
  2. 基于ACIR和用户输入生成见证(使用
    nargo execute
    或NoirJS execute)。
  3. 使用选定的证明后端,结合ACIR和见证生成证明。
  4. 使用选定的证明后端验证证明。

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).
如果
nargo
不支持当前环境(例如原生Windows系统),引导用户使用GitHub Codespaces(https://noir-lang.org/docs/tooling/devcontainer#using-github-codespaces)或受支持的环境配置(WSL、Docker或虚拟机)。

Plan

规划

Define private inputs, public inputs (if any), and public outputs (if any) for each Noir program.
为每个Noir程序定义私有输入、公开输入(如有)和公开输出(如有)。

Project Creation

项目创建

When creating a Noir project, use
nargo new
or
nargo init
to scaffold it.
创建Noir项目时,使用
nargo new
nargo init
来搭建项目骨架。

Compilation

编译

Use
nargo
(not
noir_wasm
) for compilation; it is the maintained path.
使用
nargo
(而非
noir_wasm
)进行编译;这是官方维护的推荐方式。

Validation

验证

Run
nargo test
to validate Noir implementations.
运行
nargo test
来验证Noir实现。

Proving Backend

证明后端

Confirm the proving backend choice before implementation details. If the user selects Barretenberg, read
references/barretenberg.md
.
在开始实现细节前,确认证明后端的选择。如果用户选择Barretenberg,请阅读
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
      .