Is there any tui-ish crate that works both in terminal and in wasm? (This seems like it should be a solved problem, but I am not finding the solution, so perhaps my search keywords are off.)
TUI libraries typically rely on having a terminal emulator available (the application the shell runs in. Terminal.app, PowerShell, CMD, etc). A TUI library that supported WASM in the browser would need to include an entire DOM and JavaScript based terminal emulator.
From a brief search there appear to be several web terminal emulators available, but they all seem focused on connecting to a server process rather than running a program locally in the browser environment.
I can certainly see the appeal of supporting WASM in a TUI library but it would be quite a bit of work.