ssbc / ssb-validate2-rsjs

Cryptographic validation of Scuttlebutt messages in the form of bindings (Rust) for Node.js.
3 stars 0 forks source link

Introduce WebWorkers for WASM #20

Closed mycognosist closed 3 years ago

mycognosist commented 3 years ago

Move WASM off the main thread

The major change here comes in the form of web/worker.js which uses the Comlink library to move our WASM loading / initialization and WebWorker threadpool initialization off the main thread. Background context and further details can be read here (ie. why do we have to use WebWorkers?).

web/example/main.js gives an example of how web/worker.js loaded and utilized.

Minor changes

I'm holding-off on updating the root README.md (oriented towards users of ssb-validate2-rsjs) until we have clarity on how we want to handle the API(s).