wasmerio / webassembly.sh

Open-source and installable PWA terminal powered by WebAssembly, WAPM, and Wasmer-JS 🖥

Home Page:https://webassembly.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why stdin is implemented via alert-like prompt?

HKalbasi opened this issue · comments

I think xterm has the ability to be a complete terminal. Is there a specific reason for this? Or just for simplicity of implementation?

As @nlewycky said in forum, This is related to SharedArrayBuffer that is not available in Firefox. Now (firefox 79) SharedArrayBuffer is available in cross origin isolated contexts. helpful links:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
https://web.dev/coop-coep/

I wonder if an in-browser transform to make WASI fd_read async using the approach in the following article could be an alternative: https://deislabs.io/posts/a-simple-wasm-linker-js/

Could be useful since it might be a while until there is ubiquitous server participation with COOP and COEP, ie GitHub pages, etc.

Edit: Because I've made this statement in several places, just wanted to point out ServiceWorkers may be useful for static file servers that lack header configuration: https://dev.to/stefnotch/enabling-coop-coep-without-touching-the-server-2d3n

I copied the site over here and added COOP which makes it work again without the prompt - so can confirm this is fixable - not sure where the owner of this repo and website is these days though
https://www.tokera.com/sh/

Would love to get that official project updated too. I tested r2 in tokera/sh and it works pretty well (visual mode is not) but only in chrome. In safari i still get the browser dialog

found out why this project is so quiet... it would appear that the main developer who wrote it (Aaron) moved jobs from wasmer over to fastly...

https://www.linkedin.com/in/aaronthedev/

I'm willing to fork it and put the hours in from my end if someone with good NodeJS experience wants to also help - its a great project worth working I think