hostilefork / replpad-js

Interactive Web Console for Rebol language (Ren-C branch)
GNU Lesser General Public License v3.0
13 stars 9 forks source link

WASM version on Firefox 84.0.1 #83

Closed MarkoSchuetz closed 3 years ago

MarkoSchuetz commented 3 years ago

I'm trying to run the WASM version on Firefox 84.0.1. On this version of the browser you can no longer just turn on shared memory. Instead, the server has to set the HTTP header fields

Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin

As described here.

I found instructions on how to modify the local simple pythonHTTP server here. Now the console shows

Has SharedArrayBuffer => true 
Has Threads => true
Use Asyncify => true

Then I added crossorigin to the script loaded from https://metaeducation.s3.amazonaws.com/travis-builds/load-r3.js and it loads. But the (generated) load of https://metaeducation.s3.amazonaws.com/travis-builds/0.16.1/libr3-9c8c9a9.js is blocked.

When I use the ?local URI parameter, it works.

hostilefork commented 3 years ago

Actually...the messages on that are outdated. I just removed them before your message (coincidence?)

We're not supporting the threaded version for now, precisely due to these reasons:

https://forum.rebol.info/t/pros-and-cons-of-the-pthread-web-build/1425

If it's not working in firefox just by default, let me know.