wasmerio / webassembly.sh

Open-source and installable PWA terminal powered by WebAssembly, WAPM, and Wasmer-JS 🖥
https://webassembly.sh
MIT License
292 stars 32 forks source link

Why stdin is implemented via alert-like prompt? #79

Open HKalbasi opened 4 years ago

HKalbasi commented 4 years ago

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

HKalbasi commented 4 years ago

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/

rajsite commented 4 years ago

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

john-sharratt commented 3 years ago

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/

trufae commented 3 years ago

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

john-sharratt commented 3 years ago

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