Skip to content

Commit 4781f10

Browse files
committed
Merge branch 'master' into phated/lsp-wasm
* master: (85 commits) feat: Add noir types package (#2893) chore: add scripts for testing (#2890) chore(noir-js): Add program API (#2856) feat(traits): multi module support for traits (#2844) chore(noir): Release (master) (#2879) chore: set up noir_js in integration tests (#2871) chore!: update to `bb` version 0.7.3 (#2729) chore: remove additional yarn install in `acvm_js` (#2885) chore: remove messagepack serialization logic (#2865) chore: improve workspace clean (#2870) fix: finer bit size in bound constrain (#2869) feat: Contract events in artifacts (#2873) chore: remove leftover files from `acvm-repo` (#2861) chore: miscellaneous ACVM fixups (#2864) chore(noir): Release (master) (#2875) fix: Remove cast for field comparisons in brillig (#2874) fix: remove duplication of code to load stdlib files (#2868) chore(noir_js): remove unnecessary input validation in JS (#2841) chore: build yarn packages in parallel (#2867) chore(ci): remove `toml2json` dependency (#2862) ...
2 parents 05b2af6 + e8fc868 commit 4781f10

File tree

538 files changed

+22697
-1974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

538 files changed

+22697
-1974
lines changed

.eslintrc.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
module.exports = {
22
root: true,
3-
parser: "@typescript-eslint/parser",
4-
plugins: ["@typescript-eslint", "prettier"],
5-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint', 'prettier'],
5+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
66
rules: {
7-
"comma-spacing": ["error", { before: false, after: true }],
8-
"no-unused-vars": "off",
9-
"@typescript-eslint/no-unused-vars": [
10-
"warn", // or "error"
7+
'comma-spacing': ['error', { before: false, after: true }],
8+
'no-unused-vars': 'off',
9+
'@typescript-eslint/no-unused-vars': [
10+
'warn', // or "error"
1111
{
12-
argsIgnorePattern: "^_",
13-
varsIgnorePattern: "^_",
14-
caughtErrorsIgnorePattern: "^_",
12+
argsIgnorePattern: '^_',
13+
varsIgnorePattern: '^_',
14+
caughtErrorsIgnorePattern: '^_',
1515
},
1616
],
17-
"prettier/prettier": "error",
17+
'prettier/prettier': 'error',
1818
},
1919
};

.github/NIGHTLY_TEST_FAILURE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "nightly test-integration failed"
3-
assignees: kobyhallx, phated, tomafrench, jonybur
3+
assignees: kobyhallx, tomafrench, jonybur
44
labels: bug
55
---
66

.github/workflows/publish-abi_wasm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ jobs:
4646
- name: Publish to npm
4747
working-directory: ./temp_publish_dir
4848
run: |
49-
npm publish --tag latest
49+
yarn npm publish --tag latest
5050
env:
5151
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish-acvm-js.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish acvm_js
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
acvm-ref:
7+
description: The acvm reference to checkout
8+
required: true
9+
10+
jobs:
11+
publish-acvm-js-package:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout sources
15+
uses: actions/checkout@v4
16+
with:
17+
ref: ${{ inputs.acvm-ref }}
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
registry-url: "https://registry.npmjs.org"
23+
node-version: 18.15
24+
25+
- uses: cachix/install-nix-action@v22
26+
with:
27+
nix_path: nixpkgs=channel:nixos-23.05
28+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- uses: cachix/cachix-action@v12
31+
with:
32+
name: barretenberg
33+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
34+
35+
- name: Build acvm-js
36+
working-directory: acvm-repo
37+
run: |
38+
nix build .#
39+
40+
- name: Discover Build Output Path
41+
working-directory: acvm-repo
42+
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV
43+
44+
- name: Copy Build Output to Temporary Directory
45+
working-directory: acvm-repo
46+
run: |
47+
mkdir temp_publish_dir
48+
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
49+
50+
- name: Publish to NPM
51+
working-directory: ./acvm-repo/temp_publish_dir
52+
run: npm publish
53+
env:
54+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish-acvm.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Publish ACVM crates
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
acvm-ref:
7+
description: The acvm reference to checkout
8+
required: true
9+
10+
jobs:
11+
publish:
12+
name: Publish in order
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ inputs.acvm-ref }}
19+
20+
- name: Setup toolchain
21+
uses: dtolnay/rust-toolchain@master
22+
with:
23+
toolchain: 1.66.0
24+
25+
# These steps are in a specific order so crate dependencies are updated first
26+
- name: Publish acir_field
27+
run: |
28+
cargo publish --package acir_field
29+
env:
30+
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}
31+
32+
- name: Publish brillig
33+
run: |
34+
cargo publish --package brillig
35+
env:
36+
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}
37+
38+
- name: Publish acir
39+
run: |
40+
cargo publish --package acir
41+
env:
42+
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}
43+
44+
- name: Publish acvm_blackbox_solver
45+
run: |
46+
cargo publish --package acvm_blackbox_solver
47+
env:
48+
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}
49+
50+
- name: Publish barretenberg_blackbox_solver
51+
run: |
52+
cargo publish --package barretenberg_blackbox_solver
53+
env:
54+
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}
55+
56+
- name: Publish acvm_stdlib
57+
run: |
58+
cargo publish --package acvm_stdlib
59+
env:
60+
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}
61+
62+
- name: Publish brillig_vm
63+
run: |
64+
cargo publish --package brillig_vm
65+
env:
66+
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}
67+
68+
- name: Publish acvm
69+
run: |
70+
cargo publish --package acvm
71+
env:
72+
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}
File renamed without changes.

.github/workflows/noir-js.yml .github/workflows/publish-noir-js.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ jobs:
2323
source $HOME/.cargo/env
2424
cargo install -f wasm-bindgen-cli --version 0.2.86
2525
26-
- name: Install toml2json
27-
run: |
28-
source $HOME/.cargo/env
29-
cargo install toml2json
30-
3126
- name: Install wasm-opt
3227
run: |
3328
npm i wasm-opt -g
@@ -47,6 +42,6 @@ jobs:
4742

4843
- name: Publish to NPM
4944
working-directory: ./tooling/noir_js
50-
run: npm publish --access public
45+
run: yarn npm publish --access public
5146
env:
52-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release-source-resolver.yml .github/workflows/publish-source-resolver.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Release and Publish Source Resolver
1+
name: Publish Source Resolver
22

33
on:
44
workflow_dispatch:
55

66
jobs:
77
release-source-resolver:
8-
name: Release and Publish Source Resolver
8+
name: Publish Source Resolver
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
@@ -19,6 +19,6 @@ jobs:
1919

2020
- name: Publish to NPM
2121
working-directory: ./compiler/source-resolver
22-
run: npm publish
22+
run: yarn npm publish
2323
env:
2424
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
File renamed without changes.

.github/workflows/release.yml

+31-5
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Dispatch to publish workflow
6060
uses: benc-uk/workflow-dispatch@v1
6161
with:
62-
workflow: publish.yml
62+
workflow: publish-nargo.yml
6363
repo: noir-lang/noir
6464
ref: master
6565
token: ${{ secrets.GITHUB_TOKEN }}
@@ -74,7 +74,7 @@ jobs:
7474
- name: Dispatch to noir_wasm
7575
uses: benc-uk/workflow-dispatch@v1
7676
with:
77-
workflow: release-noir-wasm.yml
77+
workflow: publish-noir-wasm.yml
7878
ref: master
7979
token: ${{ secrets.NOIR_REPO_TOKEN }}
8080

@@ -87,7 +87,7 @@ jobs:
8787
- name: Dispatch to noir_wasm
8888
uses: benc-uk/workflow-dispatch@v1
8989
with:
90-
workflow: noir-js.yml
90+
workflow: publish-noir-js.yml
9191
ref: master
9292
token: ${{ secrets.NOIR_REPO_TOKEN }}
9393

@@ -100,11 +100,11 @@ jobs:
100100
- name: Dispatch to source resolver
101101
uses: benc-uk/workflow-dispatch@v1
102102
with:
103-
workflow: release-source-resolver.yml
103+
workflow: publish-source-resolver.yml
104104
ref: master
105105
token: ${{ secrets.NOIR_REPO_TOKEN }}
106106

107-
dispatch-publish-abi-wasm:
107+
publish-abi-wasm:
108108
name: Dispatch to publish-abi_wasm workflow
109109
needs: [release-please]
110110
if: ${{ needs.release-please.outputs.tag-name }}
@@ -117,3 +117,29 @@ jobs:
117117
repo: ${{ github.repository }}
118118
token: ${{ secrets.GITHUB_TOKEN }}
119119
inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}" }'
120+
121+
publish-acvm:
122+
name: Publish crates
123+
needs: [release-please]
124+
if: ${{ needs.release-please.outputs.tag-name }}
125+
runs-on: ubuntu-latest
126+
steps:
127+
- name: Dispatch to publish workflow
128+
uses: benc-uk/workflow-dispatch@v1
129+
with:
130+
workflow: publish-acvm.yml
131+
ref: master
132+
inputs: '{ "acvm-ref": "${{ needs.release-please.outputs.tag-name }}" }'
133+
134+
publish-acvm-js:
135+
name: Dispatch to publish-acvm-js workflow
136+
needs: [release-please]
137+
if: ${{ needs.release-please.outputs.tag-name }}
138+
runs-on: ubuntu-latest
139+
steps:
140+
- name: Trigger publish-acvm-js.yml workflow
141+
uses: benc-uk/workflow-dispatch@v1
142+
with:
143+
workflow: publish-acvm-js.yml
144+
ref: master
145+
inputs: '{ "acvm-ref": "${{ needs.release-please.outputs.tag-name }}" }'

.github/workflows/abi_wasm.yml .github/workflows/test-abi_wasm.yml

+5-28
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,23 @@ jobs:
2222
- name: Checkout sources
2323
uses: actions/checkout@v3
2424

25-
- uses: cachix/install-nix-action@v20
25+
- name: Setup Nix
26+
uses: cachix/install-nix-action@v22
2627
with:
2728
nix_path: nixpkgs=channel:nixos-23.05
2829
github_access_token: ${{ secrets.GITHUB_TOKEN }}
2930

30-
- name: Restore nix store cache
31-
uses: actions/cache/restore@v3
32-
id: cache
31+
- uses: cachix/cachix-action@v12
3332
with:
34-
path: ${{ env.CACHED_PATH }}
35-
key: ${{ runner.os }}-flake-abi-wasm-${{ hashFiles('*.lock') }}
36-
37-
# Based on https://github.com/marigold-dev/deku/blob/b5016f0cf4bf6ac48db9111b70dd7fb49b969dfd/.github/workflows/build.yml#L26
38-
- name: Copy cache into nix store
39-
if: steps.cache.outputs.cache-hit == 'true'
40-
# We don't check the signature because we're the one that created the cache
41-
run: |
42-
for narinfo in ${{ env.CACHED_PATH }}/*.narinfo; do
43-
path=$(head -n 1 "$narinfo" | awk '{print $2}')
44-
nix copy --no-check-sigs --from "file://${{ env.CACHED_PATH }}" "$path"
45-
done
33+
name: barretenberg
34+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
4635

4736
- name: Build noirc_abi_wasm
4837
run: |
4938
nix build -L .#noirc_abi_wasm
5039
cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm
5140
cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm
5241
53-
- name: Export cache from nix store
54-
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
55-
run: |
56-
nix copy --to "file://${{ env.CACHED_PATH }}?compression=zstd&parallel-compression=true" .#noirc-abi-wasm-cargo-artifacts
57-
58-
- uses: actions/cache/save@v3
59-
# Don't create cache entries for the merge queue.
60-
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
61-
with:
62-
path: ${{ env.CACHED_PATH }}
63-
key: ${{ steps.cache.outputs.cache-primary-key }}
64-
6542
- name: Dereference symlink
6643
run: echo "UPLOAD_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
6744

0 commit comments

Comments
 (0)