Workers + WASM + Rollup Experiment

Is it possible to use worker + WASM in a library that targets both browsers and node? This repo is a proof of concept of how that could be done.

This work is built on top of the method proposed in this article and uses comlink to bridge the gap between node's worker-threads and web-workers.

Running the examples

First, make sure to install emscripten and then build the project:

npm install
npm run build

Once that is done, you can run the project in either Node or the Browser: