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: Sync from noir #12298

Merged
merged 9 commits into from
Feb 26, 2025
Merged
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
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f0c1c7ba3feaaa28905bb0813d14acc6673ca797
42b4ba3fa2f1dfdb92f197bfbe25884078256ae2
2 changes: 1 addition & 1 deletion avm-transpiler/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.75.0"
channel = "1.85.0"
components = ["rust-src"]
targets = []
profile = "default"
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function check_toolchains {
encourage_dev_container
echo "Rust version 1.75 not installed."
echo "Installation:"
echo " curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.75.0"
echo " curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85.0"
exit 1
fi
# Check wasi-sdk version.
Expand Down
4 changes: 2 additions & 2 deletions build-images/src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ COPY --from=wasi-sdk /opt/wasi-sdk /opt/wasi-sdk
COPY --from=foundry /opt/foundry /opt/foundry
ENV PATH="/opt/foundry/bin:$PATH"

# Install rust and cross-compilers. Noir specifically uses 1.75.0.
# Install rust and cross-compilers. Noir specifically uses 1.85.0.
# We give everyone write ownership so downstream boxes can write.
ENV RUSTUP_HOME=/opt/rust/rustup
ENV CARGO_HOME=/opt/rust/cargo
ENV PATH="/opt/rust/cargo/bin:$PATH"
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.75.0 && \
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85.0 && \
rustup target add wasm32-unknown-unknown wasm32-wasi aarch64-apple-darwin && \
chmod -R a+w /opt/rust

Expand Down
6 changes: 3 additions & 3 deletions noir/noir-repo/.github/benchmark_projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ projects:
num_runs: 5
compilation-timeout: 2.5
execution-timeout: 0.08
compilation-memory-limit: 300
compilation-memory-limit: 350
execution-memory-limit: 250
private-kernel-tail:
repo: AztecProtocol/aztec-packages
Expand All @@ -18,7 +18,7 @@ projects:
compilation-timeout: 1.2
execution-timeout: 0.02
compilation-memory-limit: 250
execution-memory-limit: 210
execution-memory-limit: 230
private-kernel-reset:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
Expand Down Expand Up @@ -65,7 +65,7 @@ projects:
cannot_execute: true
num_runs: 1
timeout: 60
compilation-timeout: 100
compilation-timeout: 110
compilation-memory-limit: 8000
rollup-block-root:
repo: AztecProtocol/aztec-packages
Expand Down
8 changes: 4 additions & 4 deletions noir/noir-repo/.github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
// Check if any file is within the 'docs' folder
const docsChanged = files.some(file => file.filename.startsWith('docs/'));
return docsChanged;

- name: Add label if not present
if: steps.check-labels.outputs.result == 'true'
uses: actions/[email protected]
Expand All @@ -57,7 +57,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -102,13 +102,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download built docs
uses: actions/download-artifact@v4
with:
name: docs
path: ./docs/build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
Expand Down
8 changes: 4 additions & 4 deletions noir/noir-repo/.github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0
with:
targets: x86_64-unknown-linux-gnu
components: clippy, rustfmt
Expand All @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0
with:
targets: x86_64-unknown-linux-gnu
components: clippy, rustfmt
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download nargo binary
uses: ./.github/actions/download-nargo

Expand Down
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/publish-acvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

# These steps are in a specific order so crate dependencies are updated first
- name: Publish acir_field
Expand Down
16 changes: 8 additions & 8 deletions noir/noir-repo/.github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -44,7 +44,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: noirc_abi_wasm
path: |
path: |
./tooling/noirc_abi_wasm/nodejs
./tooling/noirc_abi_wasm/web
retention-days: 10
Expand All @@ -58,7 +58,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -119,7 +119,7 @@ jobs:
./acvm-repo/acvm_js/nodejs
./acvm-repo/acvm_js/web
retention-days: 3

publish-es-packages:
runs-on: ubuntu-22.04
needs: [build-acvm_js, build-noirc_abi_wasm, build-noir_wasm]
Expand All @@ -133,12 +133,12 @@ jobs:
with:
name: acvm-js
path: acvm-repo/acvm_js

- uses: actions/download-artifact@v4
with:
name: noir_wasm
path: compiler/wasm

- uses: actions/download-artifact@v4
with:
name: noirc_abi_wasm
Expand Down
13 changes: 2 additions & 11 deletions noir/noir-repo/.github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,8 @@ jobs:
with:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Setup for Apple Silicon
if: matrix.target == 'aarch64-apple-darwin'
run: |
sudo xcode-select -s /Applications/Xcode_15.4.0.app/Contents/Developer/
echo "SDKROOT=$(xcrun -sdk macosx$(sw_vers -productVersion) --show-sdk-path)" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx$(sw_vers -productVersion) --show-sdk-platform-version)" >> $GITHUB_ENV

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0
with:
targets: ${{ matrix.target }}

Expand All @@ -61,7 +54,6 @@ jobs:
cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features "${{ inputs.features }}"
cargo build --package noir_profiler --release --target ${{ matrix.target }} --no-default-features --features "${{ inputs.features }}"
cargo build --package noir_inspector --release --target ${{ matrix.target }} --no-default-features --features "${{ inputs.features }}"

- name: Package artifacts
run: |
mkdir dist
Expand Down Expand Up @@ -151,7 +143,7 @@ jobs:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0
with:
targets: ${{ matrix.target }}

Expand Down Expand Up @@ -245,4 +237,3 @@ jobs:
overwrite: true
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}


2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions noir/noir-repo/.github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down
20 changes: 10 additions & 10 deletions noir/noir-repo/.github/workflows/test-rust-workspace-msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test (MSRV check)
# TL;DR https://github.com/noir-lang/noir/issues/4384
#
# This workflow acts to ensure that we can publish to crates.io, we need this extra check as libraries don't respect the Cargo.lock file committed in this repository.
# We must then always be able to build the workspace using the latest versions of all of our dependencies, so we explicitly update them and build in this workflow.
# We must then always be able to build the workspace using the latest versions of all of our dependencies, so we explicitly update them and build in this workflow.

on:
schedule:
Expand All @@ -29,12 +29,12 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0
with:
targets: x86_64-unknown-linux-gnu

# We force the ACVM crate and all of its dependencies to update their dependencies
# This ensures that we'll be able to build the crates when they're being published.
# This ensures that we'll be able to build the crates when they're being published.
- name: Update Cargo.lock
run: |
cargo update --package acvm --aggressive
Expand All @@ -53,7 +53,7 @@ jobs:

- name: Build and archive tests
run: cargo nextest archive --workspace --archive-file nextest-archive.tar.zst

- name: Upload archive to workflow
uses: actions/upload-artifact@v4
with:
Expand All @@ -70,17 +70,17 @@ jobs:
partition: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.75.0
uses: dtolnay/rust-toolchain@1.85.0
with:
targets: x86_64-unknown-linux-gnu

- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: [email protected]

- name: Download archive
uses: actions/download-artifact@v4
with:
Expand All @@ -99,9 +99,9 @@ jobs:
runs-on: ubuntu-22.04
# We want this job to always run (even if the dependant jobs fail) as we want this job to fail rather than skipping.
if: ${{ always() }}
needs:
needs:
- run-tests

steps:
- name: Report overall success
run: |
Expand All @@ -113,7 +113,7 @@ jobs:
env:
# We treat any cancelled, skipped or failing jobs as a failure for the workflow as a whole.
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') }}

- name: Checkout
if: ${{ failure() }}
uses: actions/checkout@v4
Expand Down
Loading
Loading