wasm-worker
wasm-worker copied to clipboard
node.js usage
Can you show example usage in Node.js environment?
Hi @roccomuso,
wasm-worker is primarly designed to work in a browser invironment since it uses fetch and Web Worker APIs. If you want to use it in a NodeJS environment, Web Workers must be polyfilled using a library like node-webworker.
The APIs are the same, it is just about polyfilling these 2 interfaces, or just Web Workers if you are planning to use wasm-worker only with ArrayBuffer sources.
https://github.com/pgriess/node-webworker is 8 years old and not mantained.
I've also found this one but I've not tried it yet..