Remix.run Logo
g947o 4 hours ago

Great question, and my guess:

If you build React in C++ and Rust, even if the framework is there, you'll likely need to write your components in C++/Rust. That is a difficult problem. There are actually libraries out there that allow you to build web UI with Rust, although they are for web (+ HTML/CSS) and not specifically CLI stuff.

So someone needs to create such a library that is properly maintained and such. And you'll likely develop slower in Rust compared to JS.

These companies don't see a point in doing that. So they just use whatever already exists.

shoeb00m 4 hours ago | parent | next [-]

Opencode wrote their own tui library in zig, and then build a solidjs library on top of that.

https://github.com/anomalyco/opentui

g947o an hour ago | parent [-]

This has nothing to do with React style UI building.

Philpax 4 hours ago | parent | prev | next [-]

Those Rust libraries have existed for some time:

- https://github.com/ratatui/ratatui

- https://github.com/ccbrown/iocraft

- https://crates.io/crates/dioxus-tui

g947o an hour ago | parent [-]

Where is React? These are TUI libraries, which are not the same thing

Philpax an hour ago | parent [-]

iocraft and dioxus-tui implement the React model, or derivatives of it.

pdntspa an hour ago | parent | prev [-]

and why do they need react...

Philpax an hour ago | parent [-]

That's actually relatively understandable. The React model (not necessarily React itself) of compositional reactive one-way data binding has become dominant in UI development over the last decade because it's easy to work with and does not require you to keep track of the state of a retained UI.

Most modern UI systems are inspired by React or a variant of its model.