Skip to content
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
32 changes: 30 additions & 2 deletions .github/workflows/noir-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,39 @@ jobs:
- name: Install dependencies
run: yarn install --immutable

- name: Install jq
run: sudo apt-get install jq

- name: Install cargo and wasm-bindgen
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
cargo install -f wasm-bindgen-cli --version 0.2.86

- name: Install toml2json
run: |
source $HOME/.cargo/env
cargo install toml2json

- name: Install wasm-opt
run: |
npm i wasm-opt -g

- name: Install wasm32-unknown-unknwown target
run: |
rustup target add wasm32-unknown-unknown

- name: Build noirc_abi
Comment thread
kevaundray marked this conversation as resolved.
run: yarn workspace @noir-lang/noirc_abi build

- name: Build noir_js
run: yarn workspace @noir-lang/noir_js build

- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Publish to NPM
working-directory: ./tooling/noir_js
run: npm publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ jobs:
token: ${{ secrets.NOIR_REPO_TOKEN }}
inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}" }'

publish-noir-js:
name: Publish noir_js package
Comment thread
kevaundray marked this conversation as resolved.
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
runs-on: ubuntu-latest
steps:
- name: Dispatch to noir_wasm
uses: benc-uk/workflow-dispatch@v1
with:
workflow: noir-js.yml
ref: master
token: ${{ secrets.NOIR_REPO_TOKEN }}

dispatch-publish-abi-wasm:
name: Dispatch to publish-abi_wasm workflow
needs: [release-please]
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ compiler/source-resolver/node_modules
compiler/source-resolver/lib
compiler/source-resolver/lib-node

# Noir.js
tooling/noir_js/lib

# Nix stuff
**/outputs
result
Expand Down
5 changes: 5 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
"type": "json",
"path": "tooling/noirc_abi_wasm/package.json",
"jsonpath": "$.version"
},
{
"type": "json",
Comment thread
kevaundray marked this conversation as resolved.
"path": "tooling/noir_js/package.json",
"jsonpath": "$.version"
}
]
}
Expand Down
12 changes: 12 additions & 0 deletions tooling/noir_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,17 @@
"dependencies": {
"@noir-lang/acvm_js": "0.26.1",
"@noir-lang/noirc_abi": "workspace:*"
},
"files": [
"lib",
"package.json"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"build": "tsc"
},
"devDependencies": {
"typescript": "^5.2.2"
}
}
File renamed without changes.
14 changes: 14 additions & 0 deletions tooling/noir_js/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
Comment thread
kevaundray marked this conversation as resolved.
"target": "esnext",
"declaration": true,
"emitDeclarationOnly": false,
"module": "ESNext",
"moduleResolution": "node",
"outDir": "./lib",
"esModuleInterop": true,
"strict": true
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion tooling/noirc_abi_wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rm -rf $self_path/result >/dev/null 2>&1
if [ -v out ]; then
echo "Will install package to $out (defined outside installPhase.sh script)"
else
out="$self_path/outputs/out"
export out="$self_path/outputs/out"
Comment thread
kevaundray marked this conversation as resolved.
echo "Will install package to $out"
fi

Expand Down
5 changes: 3 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ __metadata:
dependencies:
"@noir-lang/acvm_js": 0.26.1
"@noir-lang/noirc_abi": "workspace:*"
typescript: ^5.2.2
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -7085,7 +7086,7 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:^5.0.4":
"typescript@npm:^5.0.4, typescript@npm:^5.2.2":
version: 5.2.2
resolution: "typescript@npm:5.2.2"
bin:
Expand All @@ -7105,7 +7106,7 @@ __metadata:
languageName: node
linkType: hard

"typescript@patch:typescript@^5.0.4#~builtin<compat/typescript>":
"typescript@patch:typescript@^5.0.4#~builtin<compat/typescript>, typescript@patch:typescript@^5.2.2#~builtin<compat/typescript>":
version: 5.2.2
resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=f3b441"
bin:
Expand Down