Remix.run Logo
▲ bbor a day ago

Ok I'd like to bring up something a bit more bold/controversial: why are we building big TUIs at all? Like... ever? Isn't it pretty trivial to make your rust GUI native across the three major operating systems these days, or am I underestimating that?

I prefer a TUI to a heavy Electron app, don't get me wrong. But Helix (& Mitos!) seem like a baffling choice compared to Sublime Text. Not worse: I literally don't understand the appeal.

▲saghm a day ago | parent | next [-]

I think you're underestimating this. I released a GUI app in Rust earlier this year, and I already feel like it was a headache because there was pretty much no way to avoid dynamically linking a bunch of stuff, at which point any confidence of it working across various distros went out the window, so I had to settle for an AppImage as the only binary that I distributed. I wasn't even trying to target Windows or MacOS but I have to assume that would complicate things at least as much.

I'm not saying it's insurmountable, but I don't think it's accurate to call it "trivial". There are comments on this thread mentioning that Helix hasn't released in a while but that it's relatively straightforward to build from source; I'm not confident that would be easy to preserve for a full GUI.

▲schrodinger a day ago | parent | prev | next [-]

How would you do it? Honestly curious?

If I were to build an editor, I’d want the GUI platform-native so would probably go straight for Xcode and Swift.

If I had a strong aversion to Swift, I might consider a hybrid design where the UI is Swift and write a backend in a modern, fast language I prefer (Go/Rust/C# come to mind, but this isn’t a call-to-arms in the language wars). I believe this could be achieved since LSP works well as a backend server supplying IDE-level niceties, so I could keep most functionality implementations there. I’d have to have a strong reason though since Swift is a fine language, and AI does much of the writing now.

Then again, most devs live on a Mac and deploy to Linux, and are increasingly using Agents which may be better off cloud-hosted or at least sandboxed, so lightweight Swift UI and most logic in a headless cli app could be an interesting design choice.

But the important part to me would be low-bloat and native UI, and I’ve never found cross-platform UI frameworks to hold up in practice — even if only because different OSes necessarily have different ideas of idiomatic design, so you’d either be using least common denominator UI components that feel uncanny, or reimplementing the UI for each platform.

Have you found a language / framework combo that’s fast, fits into the OS well, and is _fun_ to write and use? Or is your idea that separate implementations are now so low cost — who cares — let the AI maintain them?

Legitimately asking in good faith, so please don’t interpret anything as snippy in there — it’s just my understanding of the state of the world. I’d genuinely love to learn about how cross-platform options have expanded if I’m missing something!

▲satvikpendem 18 hours ago | parent | next [-]

> If I were to build an editor, I’d want the GUI platform-native so would probably go straight for Xcode and Swift.

That's where we'd diverge. I'm a heavy user of Flutter especially in the age of AI because even if you could have the AI rewrite 6 different version for 6 different platforms, it's just a waste of your own tokens. Rust for desktop is good enough these days, with GPUI or iced, etc.

▲saghm a day ago | parent | prev | next [-]

> lightweight Swift UI and most logic in a headless cli app could be an interesting design choice

With absolutely no hard data to back this claim, my instinct is that a library would be even better. Anything you can manage to fit into a library can be much more easily tested, and then you can define whatever frontends you want (CLI, SwiftUI, etc.) that wrap it, and even leave the door open for people to implement whatever UI they might want.

▲schrodinger a day ago | parent [-]

Depends on the split. You’re probably right — even after worrying about cross-language ABI stuff, compiled libraries would have many advantages.

But especially with Agentic AI, I could imagine some scenarios where being able to run the guts of your editor out of process, e.g. on a cloud box or even a local docker container, being pretty advantageous.

This is how Claude Code GUI works but to be fair that’s less of an editor.

▲bbor 7 hours ago | parent | prev [-]

Ok so first off I haven't done this in the agential era myself. In fact, I've made multiple (small/toy-ish) TUIs in the meantime! So I'm something of a hypocrite off the bat lol -- my only excuse is that I'm pretty darn webpilled, AKA the ultimate cross-platform system ;)

That said: I indeed was referring to rust in particular[1], based on some vague recollections that I finally took some time to confirm:

1. There is indeed a host of relatively mature options for the mapping to the boring ol' native route(s): Qt through `cxx-qt`, FLTK via `fltk-rs`, wxWidgets via `wxdragon`, and Tk via... itself, I guess? GTK also has `gtk4-rs` and `relm` and is supposedly cross platform, but with some confusing caveats. See the very end for the other "just build three apps" options, on that note.

2. The most practical option for time-crunched, not-huge projects (IMHO) is anything that lets you still use web languages for styling; obviously this stretches the sense of "GUI", but it's also wildly popular and is still far better than a full Electron monstrosity. Namely: `tauri`(/`yew`/`leptos`) automatically ties into a separate WebView impl per OS, `dioxus` made their own impl to afford React-like rendering goodies, and `ply` seems like a really promising minimalist option. All actively maintained & growing.

3. It seems the default for not-technically-native-but-feels-native apps (i.e. most apps) is `egui`, which does WASM magic for you across platforms and web (!), or `iced` which seems far too Java-y for my tastes. Neither are at v1.0.0, but I blame the abandonment of semver for that goofiness -- both have sizable teams developing in them full time, with ~30k stars each. `slint` is more mature but seems targeted at IoT/embedded.

4. I'll be honest: I was really just hinting at "whatever Zed uses", since the thread's about text editors! It turns out to be `gpui`, their own custom (yet OSS) engine with a popular external metaframework: https://github.com/longbridge/gpui-kit . As above, does WASM wizardry. More niche options that similarly implement their own languages: `xilem`, `freya`, `floem`, and `ribir` are popular growing options with ~beta vibes (i.e. pre-v1.0.0 but, like, for real this time); `vizia` and `cushy` are more alpha vibes.

5. There's a crowd of "GPU-heavy" (?) frameworks that go beyond my capability to really assess in the first place, but `makepad` is the only one that seems definitely cross-platform. `kas`, `blinc`, `tessera`, `azul`, `pax`, `rosin`, and `rui` (nice snag, that) came up too, but are (pre-)alpha vibes. Game-focused ones also exist, somewhat bafflingly (people make games in Rust??): `imgui-rs`, SDL3 via `yakui`, and Bevy via `bevy_egui` all seem mature.

6. As a bonus there's options to just build a Flutter GUI and attach a rust process to its backside via `flutter_rust_bridge` (genius!) and/or (?) `Rinf`. I've never touched Flutter at all, so uhh take that as you will, I suppose.

7. Finally, to your Swift suggestion: I think you're privileging your OSX and/or Swift preference a lot, there. I'm not sure how that even gets to be cross platform based on what I'm seeing right now, but even if it it's possible, all the OSX-specific apps I see these days (RIP Orion...) put fear into the depths of my heart. What Swift would work for is the megacorp strategy: just implementing three separate apps! Via `UniFFI` or `cacao` for Mac, `windows-rs` for DOS, and any of the open ones above for Linux.

Sorry for a long response -- procrastinating my life for sure, though I have been meaning to do this research for a long time. So thanks for the excuse! Shoutout https://blog.wybxc.cc/blog/rust-gui-survey-2026/ and https://areweguiyet.com/

TL;DR: I'd go with `tauri` for something tame, and `gpui` for a text editor in particular; regardless of what you choose, I think it's a lot, lot more tractable than you expect!

______________________________________________________________________

[1]: After the `bun` debacle turned out shockingly well, I don't think there are "language wars" anymore, just the right tool for the job for the center ~95% of the capabilities/adventerousness bellcurve, so-to-speak. Absent some necessary integration planned in another language and/or extensive experience that you don't want to waste, I think it's just straight up incorrect to pick any "general" systems language (so C, C++, Java?) over rust.

Certainly there are specialized languages that rule in their own arenas --Golang for piping data around, Haskell/LISP/Racket for cool people, Zig for Whatever Zig Does, TS for the web and cloud, Python for science, etc.-- but none of those seem necessary to tie into the GUI.

▲__m a day ago | parent | prev | next [-]

It’s just more convenient to stay in the terminal where I already do a lot of other things. Switching between guis is more of a hassle, since they try to support both keyboard and mouse but often not equally well

▲redrobein a day ago | parent | prev [-]

It's a lot easier to write and customize tuis. And it works over ssh. The appeal is probably that it's good, performant, functioning software. As a counterpoint what's the appeal of sublime over vim? What is the gui providing that I don't already have?

▲eviks 20 hours ago | parent [-]

you get all the UI that's not shackled by a primitive design of a monospaced char grid and better platform integration