Skip to content

Commit

Permalink
Merge branch 'master' into tf/noir-wasm-dedupe
Browse files Browse the repository at this point in the history
* master:
  chore: Move tooling related items into their own directory (#2644)
  chore: add `CompilationResult` helper type (#2639)
  fix: initialise arrays returned by brillig (#2048)
  chore: clippy fix (#2631)
  fix(wasm): Remove stacker from dependencies (#2637)
  • Loading branch information
TomAFrench committed Sep 11, 2023
2 parents dc6d022 + bc53432 commit c72e6cd
Show file tree
Hide file tree
Showing 1,110 changed files with 143 additions and 121 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ jobs:
- name: Set up test environment
uses: ./.github/actions/setup
with:
working-directory: ./crates/noirc_abi_wasm
working-directory: ./tooling/noirc_abi_wasm

- name: Run node tests
working-directory: ./crates/noirc_abi_wasm
run: yarn test
working-directory: ./tooling/noirc_abi_wasm
run: yarn install && yarn test

noirc-abi-wasm-test-browser:
needs: [noirc-abi-wasm-build]
Expand All @@ -110,7 +110,7 @@ jobs:
path: ./result

- name: Query playwright version
working-directory: ./crates/noirc_abi_wasm
working-directory: ./tooling/noirc_abi_wasm
run: echo "PLAYWRIGHT_VERSION=$(yarn info @web/test-runner-playwright --json | jq .children.Version)" >> $GITHUB_ENV

- name: Cache playwright binaries
Expand All @@ -124,15 +124,15 @@ jobs:
- name: Set up test environment
uses: ./.github/actions/setup
with:
working-directory: ./crates/noirc_abi_wasm
working-directory: ./tooling/noirc_abi_wasm

- name: Install playwright deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: ./crates/noirc_abi_wasm
working-directory: ./tooling/noirc_abi_wasm
run: |
npx playwright install
npx playwright install-deps
- name: Run browser tests
working-directory: ./crates/noirc_abi_wasm
run: yarn test:browser
working-directory: ./tooling/noirc_abi_wasm
run: yarn install && yarn test:browser
12 changes: 6 additions & 6 deletions .github/workflows/release-source-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Bump version
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
id: bump_version
run: |
if [ -z "${{ github.event.inputs.version }}" ]; then
Expand All @@ -27,15 +27,15 @@ jobs:
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Install dependencies
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm install

- name: Build noir-source-resolver
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm run build

- name: Publish to NPM
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Commit updates
run: |
git add crates/source-resolver/package-lock.json
git add crates/source-resolver/package.json
git add compiler/source-resolver/package-lock.json
git add compiler/source-resolver/package.json
git commit -m "chore: Update source-resolver to ${{ env.NEW_VERSION }}"
git push
4 changes: 2 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ jobs:
retention-days: 3

- name: Install `integration-tests` dependencies
working-directory: ./crates/integration-tests
working-directory: ./compiler/integration-tests
run: yarn install

- name: Run `integration-tests`
working-directory: ./crates/integration-tests
working-directory: ./compiler/integration-tests
run: |
yarn test:browser
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-source-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Test Source Resolver
on:
push:
paths:
- "crates/source-resolver/**"
- "compiler/source-resolver/**"
pull_request:
paths:
- "crates/source-resolver/**"
- "compiler/source-resolver/**"

jobs:
test:
Expand All @@ -17,13 +17,13 @@ jobs:
uses: actions/checkout@v3

- name: Install dependencies
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm install

- name: Build noir-source-resolver
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm run build

- name: Run tests
working-directory: ./crates/source-resolver
working-directory: ./compiler/source-resolver
run: npm run test
12 changes: 6 additions & 6 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: noir_wasm
path: ./crates/wasm/result
path: ./compiler/wasm/result

- name: Download nargo binary
uses: actions/download-artifact@v3
Expand All @@ -140,7 +140,7 @@ jobs:
path: ./nargo

- name: Compile test program with Nargo CLI
working-directory: ./crates/wasm/noir-script
working-directory: ./compiler/wasm/noir-script
run: |
nargo_binary=${{ github.workspace }}/nargo/nargo
chmod +x $nargo_binary
Expand All @@ -149,20 +149,20 @@ jobs:
- name: Set up test environment
uses: ./.github/actions/setup
with:
working-directory: ./crates/wasm
working-directory: ./compiler/wasm

- name: Install dependencies
working-directory: ./crates/wasm
working-directory: ./compiler/wasm
run: yarn install

- name: Install playwright deps
working-directory: ./crates/wasm
working-directory: ./compiler/wasm
run: |
npx playwright install
npx playwright install-deps
- name: Run tests
working-directory: ./crates/wasm
working-directory: ./compiler/wasm
run: |
yarn test:browser
yarn test:node
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ node_modules
pkg/

# Source resolver
crates/source-resolver/node_modules
crates/source-resolver/lib
crates/source-resolver/lib-node
compiler/source-resolver/node_modules
compiler/source-resolver/lib
compiler/source-resolver/lib-node

# Nix stuff
**/outputs
Expand All @@ -25,8 +25,8 @@ result
*.vk
**/Verifier.toml
**/target
!crates/nargo_cli/tests/acir_artifacts/*/target
!crates/nargo_cli/tests/acir_artifacts/*/target/witness.gz
!tooling/nargo_cli/tests/acir_artifacts/*/target
!tooling/nargo_cli/tests/acir_artifacts/*/target/witness.gz

# Github Actions scratch space
# This gives a location to download artifacts into the repository in CI without making git dirty.
Expand Down
23 changes: 0 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 36 additions & 31 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
[workspace]

members = [
"crates/acvm_backend_barretenberg",
"crates/noirc_evaluator",
"crates/noirc_frontend",
"crates/noirc_errors",
"crates/noirc_driver",
"crates/noirc_printable_type",
"crates/nargo",
"crates/nargo_cli",
"crates/nargo_toml",
"crates/fm",
"crates/arena",
"crates/noirc_abi",
"crates/noirc_abi_wasm",
"crates/iter-extended",
"crates/wasm",
"compiler/noirc_evaluator",
"compiler/noirc_frontend",
"compiler/noirc_errors",
"compiler/noirc_driver",
"compiler/noirc_printable_type",
"compiler/fm",
"compiler/wasm",
# Utility crates used by the Noir compiler
"compiler/utils/arena",
"compiler/utils/iter-extended",
# Crates related to tooling built ontop of the Noir compiler
"tooling/acvm_backend_barretenberg",
"tooling/nargo",
"tooling/nargo_cli",
"tooling/nargo_toml",
"tooling/noirc_abi",
"tooling/noirc_abi_wasm",
]
default-members = ["crates/nargo_cli"]
default-members = ["tooling/nargo_cli"]
resolver = "2"

[workspace.package]
Expand All @@ -30,26 +32,29 @@ rust-version = "1.66"

[workspace.dependencies]
acvm = "0.26.0"
arena = { path = "crates/arena" }
fm = { path = "crates/fm" }
iter-extended = { path = "crates/iter-extended" }
nargo = { path = "crates/nargo" }
nargo_cli = { path = "crates/nargo_cli" }
nargo_toml = { path = "crates/nargo_toml" }
noir_lsp = { path = "crates/lsp" }
noirc_abi = { path = "crates/noirc_abi" }
noirc_driver = { path = "crates/noirc_driver" }
noirc_errors = { path = "crates/noirc_errors" }
noirc_evaluator = { path = "crates/noirc_evaluator" }
noirc_frontend = { path = "crates/noirc_frontend" }
noirc_printable_type = { path = "crates/noirc_printable_type" }
noir_wasm = { path = "crates/wasm" }
arena = { path = "compiler/utils/arena" }
fm = { path = "compiler/fm" }
iter-extended = { path = "compiler/utils/iter-extended" }
nargo = { path = "tooling/nargo" }
nargo_cli = { path = "tooling/nargo_cli" }
nargo_toml = { path = "tooling/nargo_toml" }
noir_lsp = { path = "tooling/lsp" }
noirc_abi = { path = "tooling/noirc_abi" }
noirc_driver = { path = "compiler/noirc_driver" }
noirc_errors = { path = "compiler/noirc_errors" }
noirc_evaluator = { path = "compiler/noirc_evaluator" }
noirc_frontend = { path = "compiler/noirc_frontend" }
noirc_printable_type = { path = "compiler/noirc_printable_type" }
noir_wasm = { path = "compiler/wasm" }
cfg-if = "1.0.0"
clap = { version = "4.3.19", features = ["derive"] }
codespan = { version = "0.11.1", features = ["serialization"] }
codespan-lsp = "0.11.1"
codespan-reporting = "0.11.1"
chumsky = { git = "https://github.com/jfecher/chumsky", rev = "ad9d312" }
chumsky = { git = "https://github.com/jfecher/chumsky", rev = "ad9d312", default-features = false, features = [
"ahash",
"std",
] }
dirs = "4"
lsp-types = "0.94"
serde = { version = "1.0.136", features = ["derive"] }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ const CIRCUIT_SIZE = 2 ** 19;

const test_cases = [
{
case: "crates/nargo_cli/tests/execution_success/1_mul"
case: "tooling/nargo_cli/tests/execution_success/1_mul"
},
{
case: "crates/nargo_cli/tests/execution_success/double_verify_proof"
case: "tooling/nargo_cli/tests/execution_success/double_verify_proof"
}
];

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c72e6cd

Please sign in to comment.