container2wasm icon indicating copy to clipboard operation
container2wasm copied to clipboard

How to `wasiHack` with [email protected]?

Open bfeitknecht opened this issue 5 months ago • 4 comments

How could one connect WASI to xterm in the newer versions of xterm-pty that does away with TtyServer and TtyClient? Specifically here. https://github.com/container2wasm/container2wasm/blob/b65b27f041da6a6dec90a6c223f5f944df05c4f8/examples/wasi-browser/htdocs/worker.js#L65

bfeitknecht avatar Sep 10 '25 19:09 bfeitknecht

It seems that the recent version of xterm-pty replaced them to emscripte-pty.js so we need to port this for the WASI-on-browser setting.

ktock avatar Sep 11 '25 04:09 ktock

How would that look on a high level?

bfeitknecht avatar Sep 11 '25 07:09 bfeitknecht

How would that look on a high level?

One possible view would be to make the "PTY Slave" object of xterm-pty accessible in the worker then use it in wasiHack. ShardArrayBuffer can be used for the bridging. If you have better ideas, suggestions are welcome.

ktock avatar Sep 11 '25 08:09 ktock

It seems this is currently not possible but will be worked on. See here.

bfeitknecht avatar Sep 11 '25 16:09 bfeitknecht