leaningtech / webvm

Virtual Machine for the Web

Home Page:https://webvm.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Source Code for running WebVM don't work on github pages

AlejandroReBa opened this issue · comments

Just to check if it was possible to run WebVM on top of github pages I cloned your repository and copy the content inside a new branch.

Regrettably, it says that "CheerpX could not start"

image

url: https://alejandroreba.github.io/

Are you aware of any limitation?

For SharedArrayBuffer to be enabled, cross origin isolation headers have to be set properly on all resources you are using.

For the webvm.io deployment since we control headers, it means the only other means of failure is SAB not being allowed at a broweser level (eg. Safari < 15.2, mostly present on non uptaded iPhones, still not supports it across the board).

For testing I would recommend serving the repo locally, see for eg. #9.
The recommended workflow is like:
ngnix -c nginx.conf -p .
from the repo main folder.

I see, on github pages nginx configuration is probably bypassed and web started from the index.html file.

For debugging on mac I installed nginx with homebrew, modified the nginx configuration to point out the right mime.types file

Downloaded from: https://raw.githubusercontent.com/rentzsch/nginx-homebrew-support/master/Library/Nginx/Configuration/mime.types
saved on:  /usr/local/Cellar/nginx/1.21.6/conf/mime.types;

then applied
nginx -c nginx.conf -p .

Checking against localhost:8082 --> same error
Checking against localhost:8081 --> it works!

So probably my main idea to combine WebVM on github pages won't work.

Thanks for the quick answer.