wasm-worker icon indicating copy to clipboard operation
wasm-worker copied to clipboard

node.js usage

Open roccomuso opened this issue 6 years ago • 3 comments

Can you show example usage in Node.js environment?

roccomuso avatar Feb 27 '19 11:02 roccomuso

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.

mbasso avatar Mar 17 '19 17:03 mbasso

https://github.com/pgriess/node-webworker is 8 years old and not mantained.

roccomuso avatar Mar 17 '19 19:03 roccomuso

I've also found this one but I've not tried it yet..

mbasso avatar Apr 02 '19 19:04 mbasso