Description
Firefox has recently added restrictions on WebAssembly.Memory objects shared between webworkers. (see here). Chrome is also planning on adding that in the near future.
Unfortunately this means that pthreads builds no longer work with Firefox, and will soon start failing in Chrome.
Some examples of projects that no longer work in Firefox:
https://rustwasm.github.io/wasm-bindgen/exbuild/raytrace-parallel/
https://www.qt.io/web-assembly-example-mandelbrot
https://brianotto.github.io/ui-builder/web/
These now throw: TypeError: The WebAssembly.Memory object cannot be serialized. The Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy HTTP headers will enable this in the future.
Currently I'm working around this by setting the preference: dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled
(the Emscripten tests do the same), but obviously this is not a proper solution.
I tried adding the following headers to emrun:
Cross-Origin-Resource-Policy: same-site
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
however this appeared to have no effect.
Anyone know what we're actually supposed to do? Ideally we should fix emrun, and update the wiki so people know the server requirements for serving wasm.