`threads` test (possibly others) broken on library's demo webpage
FlippingBinary opened this issue · comments
I hope this is the right place to alert the person who controls the website that demonstrates this library. I'm opening this issue here because the source code for the website appears to be hosted in this repository.
I believe this issue is related to the security requirements that were added to SharedArrayBuffer
. The website does not appear to be cross origin isolated.
Steps to reproduce:
- Visit this library's demo webpage at https://wasm-feature-detect.surma.technology
- Observe failed threads test.
- Open browser console, type
crossOriginIsolated
- it isfalse
.
Steps to confirm browser actually does support web assembly threads and cross origin isolation is likely cause of the difference:
- Visit
wasm-bindgen-rayon
demo webpage at https://rreverser.com/wasm-bindgen-rayon-demo/ - Compare results of single-threaded vs multi-threaded - multi-threaded is faster.
- Open browser console, type
crossOriginIsolated
- it istrue
.
Possible solution:
- Add security headers to deployment server's configuration.
Thanks for the report. The "official" demo page is https://webassembly.org/roadmap/, though, and there it works:
@surma, you may want to fix your headers.