| ▲ | bbor 8 hours ago | |
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. | ||