webassembly.sh icon indicating copy to clipboard operation
webassembly.sh copied to clipboard

Why stdin is implemented via alert-like prompt?

Open HKalbasi opened this issue 5 years ago • 5 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?

HKalbasi avatar Aug 02 '20 13:08 HKalbasi

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/

HKalbasi avatar Aug 25 '20 21:08 HKalbasi

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

rajsite avatar Nov 17 '20 17:11 rajsite

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/

john-sharratt avatar Oct 01 '21 20:10 john-sharratt

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

trufae avatar Oct 03 '21 11:10 trufae

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

john-sharratt avatar Oct 20 '21 17:10 john-sharratt