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

feat!: Rename noir-execute to noir-executor #7605

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/actions/download-noir-execute/action.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/actions/download-noir-executor/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Download noir-executor
description: Downloads the noir-executor binary from an artifact and adds it to the path

runs:
using: composite
steps:
- name: Download noir-executor binary
uses: actions/download-artifact@v4
with:
name: noir-executor
path: ./noir-executor

- name: Set noir-executor on PATH
shell: bash
run: |
noir_binary="${{ github.workspace }}/noir-executor/noir-executor"
chmod +x $noir_binary
echo "$(dirname $noir_binary)" >> $GITHUB_PATH
16 changes: 8 additions & 8 deletions .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
path: ./dist/*
retention-days: 3

build-noir-execute:
build-noir-executor:
runs-on: ubuntu-22.04
timeout-minutes: 30

Expand All @@ -95,19 +95,19 @@ jobs:
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}

- name: Build noir-execute
- name: Build noir-executor
run: cargo build --package noir_artifact_cli --release

- name: Package artifacts
run: |
mkdir dist
cp ./target/release/noir-execute ./dist/noir-execute
7z a -ttar -so -an ./dist/* | 7z a -si ./noir-execute-x86_64-unknown-linux-gnu.tar.gz
cp ./target/release/noir-executor ./dist/noir-executor
7z a -ttar -so -an ./dist/* | 7z a -si ./noir-executor-x86_64-unknown-linux-gnu.tar.gz

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: noir-execute
name: noir-executor
path: ./dist/*
retention-days: 3

Expand Down Expand Up @@ -491,7 +491,7 @@ jobs:
test-examples:
name: Example scripts
runs-on: ubuntu-24.04
needs: [build-nargo, build-noir-execute]
needs: [build-nargo, build-noir-executor]
timeout-minutes: 30

steps:
Expand All @@ -512,8 +512,8 @@ jobs:
- name: Download nargo binary
uses: ./.github/actions/download-nargo

- name: Download noir-execute binary
uses: ./.github/actions/download-noir-execute
- name: Download noir-executor binary
uses: ./.github/actions/download-noir-executor

- name: Run `prove_and_verify`
working-directory: ./examples/prove_and_verify
Expand Down
4 changes: 2 additions & 2 deletions examples/oracle_transcript/log_and_exec_transcript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ cat Oracle.test.jsonl \
# Execute `main` with the Prover.toml and Oracle.jsonl files.
nargo execute --skip-underconstrained-check --oracle-file Oracle.jsonl

# Also execute through `noir-execute`
noir-execute \
# Also execute through `noir-executor`
noir-executor execute \
--artifact-path target/oracle_transcript.json \
--oracle-file Oracle.jsonl \
--prover-file Prover.toml \
Expand Down
4 changes: 2 additions & 2 deletions tooling/artifact_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ workspace = true
path = "src/lib.rs"

[[bin]]
name = "noir-execute"
path = "src/bin/execute.rs"
name = "noir-executor"
path = "src/bin/executor.rs"

[dependencies]
clap.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@ const PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
static VERSION_STRING: &str = formatcp!("version = {}\n", PKG_VERSION,);

#[derive(Parser, Debug)]
#[command(name="noir-execute", author, version=VERSION_STRING, about, long_about = None)]
#[command(name="noir-executor", author, version=VERSION_STRING, about, long_about = None)]
struct ExecutorCli {
#[command(flatten)]
command: execute_cmd::ExecuteCommand,
#[command(subcommand)]
command: ExecutorCommand,
}

#[non_exhaustive]
#[derive(Subcommand, Clone, Debug)]
enum ArtifactCommand {
enum ExecutorCommand {
Execute(execute_cmd::ExecuteCommand),
// TODO: Add other commands related to executing recordings from TypeScript; see https://github.com/AztecProtocol/aztec-packages/pull/12148
// For example to decode an input map and render it as an ABI encoded prover file for integration tests.
}

pub fn start_cli() -> eyre::Result<()> {
let ExecutorCli { command } = ExecutorCli::parse();

execute_cmd::run(command)?;
match command {
ExecutorCommand::Execute(cmd) => execute_cmd::run(cmd)?,
}

Ok(())
}
Expand All @@ -41,7 +45,7 @@ fn main() {
.init();

if let Err(e) = start_cli() {
eprintln!("{e:?}");
eprintln!("{e:#}");
std::process::exit(1);
}
}
Loading