Tui crate that works on both x86_64 and wasm?

There are a number of tui crates at https://crates.io/search?q=tui but then all seem to be desktop/console focused.

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.

1 Like

How about a GUI that works in WASM and native? There's egui.

1 Like

TextEdit in egui::widgets - Rust looks useful

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.