Skip to content

Commit

Permalink
fix: web build (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalakkal authored Jan 18, 2024
1 parent f9f08ab commit a46e4ac
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 40 deletions.
6 changes: 3 additions & 3 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axiom-crypto/halo2-wasm-cli",
"version": "0.1.7-alpha.0",
"version": "0.3.2",
"description": "Halo2 Javascript library",
"main": "index.js",
"scripts": {
Expand All @@ -18,8 +18,8 @@
"author": "Intrinsic Technologies",
"license": "ISC",
"dependencies": {
"@axiom-crypto/halo2-lib-js": "0.3.0-rc.0",
"@axiom-crypto/halo2-wasm": "0.3.0-rc2.0",
"@axiom-crypto/halo2-lib-js": "0.3.2",
"@axiom-crypto/halo2-wasm": "0.3.3",
"commander": "^11.1.0",
"typescript": "^5.2.2"
},
Expand Down
18 changes: 9 additions & 9 deletions cli/pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion halo2-lib-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
"publishConfig": {
"directory": "dist"
}
}
}
8 changes: 2 additions & 6 deletions halo2-lib-js/pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion halo2-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
"devDependencies": {
"@types/prettier": "1.18.2"
}
}
}
28 changes: 9 additions & 19 deletions halo2-repl/pnpm-lock.yaml

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

1 change: 1 addition & 0 deletions halo2-wasm/js/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ export abstract class CircuitScaffold extends BaseCircuitScaffold {
this.shouldTime = options?.shouldTime ?? false;
this.loadedVk = false;
this.halo2wasm.config(this.config);
this.setContext({getKzgParams})
}
}
1 change: 1 addition & 0 deletions halo2-wasm/js/web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export abstract class CircuitScaffold extends BaseCircuitScaffold {
this.config = options?.config ?? { ...DEFAULT_CIRCUIT_CONFIG };
this.shouldTime = options?.shouldTime ?? false;
this.loadedVk = false;
this.setContext({getKzgParams})
}

async setup(numThreads: number) {
Expand Down
2 changes: 1 addition & 1 deletion halo2-wasm/scripts/build-web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ rm temp-pkg/.gitignore
# Copy a modified version of package.json and readme.md to pkg/
node ./scripts/makeSubdirPkg.js

sed -i '' "s|const pkg = await import('../../..');|const pkg = await import('../../../halo2_wasm');|g" temp-pkg/snippets/wasm-bindgen-rayon-7afa899f36665473/src/workerHelpers.js
# sed -i '' "s|const pkg = await import('../../..');|const pkg = await import('../../../halo2_wasm');|g" temp-pkg/snippets/wasm-bindgen-rayon-7afa899f36665473/src/workerHelpers.js

mv temp-pkg pkg/web

0 comments on commit a46e4ac

Please sign in to comment.