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

Make SnarkyJS run inside a web worker - RELEASES #389

Merged
merged 3 commits into from
Sep 8, 2022
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
_Security_ in case of vulnerabilities.
-->

## [Unreleased](https://github.com/o1-labs/snarkyjs/compare/3461333...HEAD)
## [Unreleased](https://github.com/o1-labs/snarkyjs/compare/f2ad423...HEAD)

### Added

- `reducer.getActions` partially implemented for local testing https://github.com/o1-labs/snarkyjs/pull/327
- `gte` and `assertGte` methods on `UInt32`, `UInt64` https://github.com/o1-labs/snarkyjs/pull/349

## [0.5.4](https://github.com/o1-labs/snarkyjs/compare/3461333...f2ad423)

### Fixed

- Running snarkyjs inside a web worker https://github.com/o1-labs/snarkyjs/issues/378

## [0.5.3](https://github.com/o1-labs/snarkyjs/compare/4f0dd40...3461333)

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "snarkyjs",
"description": "JavaScript bindings for SnarkyJS",
"version": "0.5.3",
"version": "0.5.4",
"license": "Apache-2.0",
"main": "./dist/web/index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/chrome_bindings/plonk_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function initSnarkyJS() {

let workersReady = new Promise((resolve) => (worker.onmessage = resolve));
await workersReady;
window.plonk_wasm = override_bindings(plonk_wasm, worker);
globalThis.plonk_wasm = override_bindings(plonk_wasm, worker);

// we have two approaches to run the .bc.js code after its dependencies are ready, without fetching an additional script:

Expand Down
2 changes: 1 addition & 1 deletion src/snarky/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { initSnarkyJS } from '../chrome_bindings/plonk_init.js';

export { getSnarky, getWasm, snarky_ready, shutdown };

let getSnarky = () => window.__snarky;
let getSnarky = () => globalThis.__snarky;

function getWasm() {
return globalThis.plonk_wasm;
Expand Down