You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One update here is that since #16677 landed there were some TTY hooks added in #19499 to support xterm-pty.
Those hooks cover couple of ioctl functions important for the terminal, and without some analogues it won't be possible to build libraries like xterm-pty on top of WasmFS instead of the old FS.
That said, instead of covering them one by one, could WasmFS allow to intercept arbitrary ioctl syscalls in custom device implementation? I can think of some usecases beyond the terminal, e.g. for porting umockdev.
I wonder, is there any way to use old FS and WASMFS alongside? In particular, I want to use OPFS backend in a project that already uses xterm-pty, and xterm-pty heavily relies on old FS JS API for TTY integration.
Is there any way to combine them and mount some dir with a backend from WASMFS into old FS without having to reimplement one or the other?
Yeah I know, just not sure if it counts as an actual backend. I thought it's just a JS library but not really a FS backend as e.g. MEMFS or WORKERFS or others are, so it's not clear to me if "add a bridge from WasmFS to old FS backends" would solve this particular issue or not.
I believe it is a backend - it has stream_ops etc. But there might be special hooks in the old FS for it, which might be an issue. I guess there have to be, since it isn't manually mounted like other backends...
Activity
kripken commentedon Apr 8, 2022
#16677 does not quite get to parity with the old FS (see notes there) but may be good enough for a while.
RReverser commentedon Oct 16, 2023
One update here is that since #16677 landed there were some TTY hooks added in #19499 to support xterm-pty.
Those hooks cover couple of ioctl functions important for the terminal, and without some analogues it won't be possible to build libraries like xterm-pty on top of WasmFS instead of the old FS.
That said, instead of covering them one by one, could WasmFS allow to intercept arbitrary ioctl syscalls in custom device implementation? I can think of some usecases beyond the terminal, e.g. for porting umockdev.
tlively commentedon Oct 16, 2023
Letting backends handle ioctls if they want to sgtm.
RReverser commentedon Oct 27, 2023
I wonder, is there any way to use old FS and WASMFS alongside? In particular, I want to use OPFS backend in a project that already uses xterm-pty, and xterm-pty heavily relies on old FS JS API for TTY integration.
Is there any way to combine them and mount some dir with a backend from WASMFS into old FS without having to reimplement one or the other?
kripken commentedon Oct 30, 2023
@RReverser atm no, but the general idea we've had for this is to add a bridge from WasmFS to old FS backends, #18935 (comment)
RReverser commentedon Oct 30, 2023
I don't remember without looking up, does TTY have a separate backend in legacy scheme? If so, that would help a lot, yeah.
kripken commentedon Oct 30, 2023
I believe that is
src/library_tty.jsRReverser commentedon Oct 30, 2023
Yeah I know, just not sure if it counts as an actual backend. I thought it's just a JS library but not really a FS backend as e.g. MEMFS or WORKERFS or others are, so it's not clear to me if "add a bridge from WasmFS to old FS backends" would solve this particular issue or not.
kripken commentedon Oct 30, 2023
I believe it is a backend - it has
stream_opsetc. But there might be special hooks in the old FS for it, which might be an issue. I guess there have to be, since it isn't manually mounted like other backends...RReverser commentedon Oct 30, 2023
Yeah I suspect so too, it would need to somehow proxy at least the hooks in above mentioned #19499.