The state of building user interfaces in Rust
Posted by mahirsaid 7 days ago
Comments
Comment by rendaw 4 days ago
For the small percent that's left where speed is critical, I've just been using wgpu and wgsl-bindgen directly.
I can't think of what I'd want a native UI solution for. And then having to deal with porting it to iOS, Android, Windows, Mac etc, dealing with app stores (3+?) submissions, developer fees, rejections... vs just using HTML which works on all platforms. I don't think I'd use a native UI even if there was one. Not that HTML is great by any stretch...
(I made Sunwet, this is what my stuff looks like: https://github.com/andrewbaxter/sunwet )
Comment by jenadine 4 days ago
But for desktop applications it is bloated, a big attack surface.
HTML/CSS is made for online documents, and using it for applications is a bit hack that happen to work, but hides a huge ton of complexity behind frameworks and frameworks of frameworks with leaky abstractions and each their own caveat.
Comment by ngruhn 4 days ago
Wdym? At least web apps are sandboxed by default in contrast to native.
Comment by tapirl 4 days ago
Comment by thomashabets2 3 days ago
Now, the rest of the DSP code sure is faster in native.
What are examples where web UI is too slow for you?
Or do you mean large apps written in JS, which is a different topic?
Comment by tapirl 2 days ago
Comment by thomashabets2 1 day ago
Comment by tapirl 1 day ago
Comment by worik 3 days ago
HTML5 is the sanest for me. I can actually find where code executes, tooling using browsers (Firefox or Chromium) excellent and the declarative layout works well
The hours and hours I spent chasing the executing code in Dart/Flutter and, oh my aching head, in SwiftUI made me hate those with passion
I get that it is unsuitable for desktop programmes, for many good reasons, but it is so much better to modify.
Comment by jimbob45 3 days ago
A proper first-party LLM app for ChatGPT/Claude that doesn’t buckle under the weight of large threads.
Comment by coffeeindex 3 days ago
Comment by deanishe 2 days ago
Because then your UI will work the way users of the platform expect it to.
Comment by bigstrat2003 3 days ago
So that your software is actually pleasant to use for your users. UIs built on HTML universally suck compared to native UIs.
Comment by bschwindHN 3 days ago
Oh I didn't know about this, it looks great! If it works as well as it seems to, that would be a huge ergonomic boost to using wgpu. Currently all my wgpu code has those fragile feeling pipeline layout definitions scattered around and changing the data layout is always a pain.
Comment by mahirsaid 3 days ago
Comment by wolvesechoes 3 days ago
Not everything is yet another shitty b2c "app".
There are whole industries where cross-platform support is irrelevant, as paying customers just keep using Windows.
Comment by bbkane 4 days ago
Comment by globalnode 4 days ago
Comment by rustystump 4 days ago
Comment by hypendev 4 days ago
I'm building Hypen (https://hypen.space), a UI framework with a DSL that works in in Rust, TS, Go, Kotlin, Swift, and all over the place, as long as you can use WASM or binaries.
Some cool things about it:
- Renders natively on Desktop, Web (DOM and Canvas), Android and iOS.
- Streaming-first (SSR), so you can stream native apps from the server
- Custom tailwind parser so it supports your favorite shorthands
- Support for streaming apps from CF workers with 5 lines of JS/TS
- You can embed any Hypen app into another Hypen app like its an iframe, with just 1 line of code
- Has a custom "browser" for Hypen apps, both on desktop and on mobile, so you can easily check how your app looks anywhere
- Coming soon - stdlib and WASI interface to enable full WASM portability across platforms
Note: Desktop support is still a bit early and needs more crossplatform testing
I started building this years ago, first manually, now accelerating it with LLM's which are incredible for mindnumbing tasks like writing frameworks like these requires. Its still in an "early alpha" but it's getting closer to maturity and a "stable beta" by the day, hopefully fully stable 1.0 by end of the year.
Comment by tredre3 4 days ago
That made me chuckle though:
Accessibility and i18n tooling:
This is in the plan - accessibility should be the easier one, with i18n tooling coming as more "platform calls" support comes online.
In my experience accessibility is far more difficult to get right, but maybe I've just been unlucky. :)Comment by hypendev 4 days ago
Honestly, in one iteration of Hypen I actually added a `Script` component, but after trying it, it already felt both dirty and confusing, so it's a definitive no for the near future :)
Regarding accessibility - I've also burned myself quite a few times on that bridge and that is why there won't be 1.0 without it being fully solved - I don't want devs to have to retroactively think about it or for it to have a second class implementation.
I believe there is a solution out of the box that should cover at least 80% of the most common needs, and provide primitives for more custom cases. Hopefully this time I can nail it... fingers crossed!
Comment by LoganDark 4 days ago
Comment by capitol_ 4 days ago
(I'm not affiliated, but have made PRs there in the past)
Comment by Levitating 4 days ago
Ralph Levien, author of druid and xilem made some good posts about it. I'll link one here.
https://raphlinus.github.io/rust/gui/2022/07/15/next-dozen-g...
Comment by c-smile 4 days ago
Rust was designed to build core mechanisms of UI, like internals of a browser.
But as a language-behind-ui it is quite suboptimal so I think the most successful UI framework for Rust most likely will use some form of DSL.
But if DSL then inevitably we are getting question: why not HTML/CSS/JS then?
Visual styles, layout, structure, UI logic like "on click here, hide stuff there and expand section over there" is what HTML/CSS/JS was designed for.
"Render therefore unto Cesar the things which are Cesar's;"
Comment by amelius 3 days ago
Comment by mahirsaid 4 days ago
Comment by buildbuildbuild 4 days ago
It's nice to be able to use existing design systems and components, and to be able to validate in a web browser in quicker build loops before doing the full Tauri builds. I still manually QA across platforms pretty aggressively but Tauri's "cross-platform from day one" really isn't much of a stretch. The project if curious: https://github.com/zecrocks/zkv
Comment by pilgrim0 3 days ago
Comment by segphault 4 days ago
The downside is that the dependency stack you need to do gui programming with rust is massive and the compile times are brutal. You can’t beat the application performance, though. It’s crazy how nice it feels compared to bloated electron apps.
The question of “are we gui yet” is definitely yes, at least on the desktop. The problem is that developers are too lazy to build apps with anything other than web frameworks.
Comment by Levitating 4 days ago
I think there was a community fork recently that tried to tend to these concerns.
It's not a bad thing per se, but its worth mentioning.
Comment by the__alchemist 4 days ago
Comment by vovavili 4 days ago
GPUI getting the public release greenlight will no doubt be a turning point for desktop GUI development. All it took is a small team of gifted developers to dogfood their own GUI toolkit and get some much-needed VC backing. The future looks very bright.
Comment by victor106 4 days ago
Check out: https://github.com/longbridge/gpui-component
Comment by nicce 4 days ago
Comment by ktukey 4 days ago
The component library by long bridge is also well done and reasonably well documented.
Comment by nu11ptr 4 days ago
Comment by mahirsaid 4 days ago
Comment by eviks 3 days ago
Comment by neonstatic 4 days ago
Strengths:
- Message passing model with separate Model and View paths
- Async / Sync landscape (sync on the GUI thread, tasks / subscriptions for async stuff with messages returned to the GUI thread)
- Writing custom Widgets is quite easy! In 0.14 stateful widgets got a revamp and they are quite nice
- Performance is great
- Despite being very capable, the framework is not that large. Learning it is not a daunting task
- Documentation might be sparse, but due to how it's written, I was able to just read the code and understand how it works without issue
Downsides include: - Lots of changes between releases (still pre 1.0)
- Theming. Despite being (somewhat) recently reworked, it's still overcomplicated imo
- The layouting engine is tricky to use and I fight with it much more than I should. Quite often widgets do not show up at all or take too much space because I didn't use the right combination of `Length` variants for `width` and `height` of the widget (and/or its children)
- Some interfaces seem a bit weird (I am specifically thinking about overlays)
- There is some confusion regarding what should go in the application state and what should be held in Widget's state. The interfaces are clearly defined here, but what can be / should be done is often found out in practice (perhaps I lack experience here)Comment by OptionOfT 4 days ago
https://github.com/microsoft/windows-rs/tree/master/crates/s...
It's a react-style API for WinUI3 apps, meaning it's not trying to mimic the Windows LAF. It's merely a binding.
Comment by pjmlp 3 days ago
Nothing they said on stage at CppCon 2017 came to fruition.
You're better off doing the UI in WPF and calling into Rust DLLs.
Comment by OptionOfT 3 days ago
I myself have never worked with C++/CX or C++/WinRT. My Rust journey has been exclusively on POSIX systems, so seeing windows-reactor and getting a UI in a couple of lines is pretty cool.
I would never (at least not in its current state) recommend it for production though, as the crate containing reactor isn't even on crates.io.
Could you share some of the promises made that were abandoned? (I just realized that question sounds like AI... I promise you it's not).
Comment by pjmlp 3 days ago
You can start by when C++/CX was replaced,
CppCon 2016: “Embracing Standard C++ for the Windows Runtime"
https://www.youtube.com/watch?v=lm4IwfiJ3EU
With the followup talk the year thereafter,
CppCon 2017: “C++/WinRT and the Future of C++ on Windows”
https://www.youtube.com/watch?v=7TdpWB_vRZM
Except the Visual Studio tooling comparable to C++/CX never came to be, using C++/WinRT feels to this day like using ATL with Visual C++ 6.0, except
"This isn't meant as a negative statement. cppwinrt has reached all of its goals and is generally considered complete and largely bug-free (1). Whether WinRT/WinUI/WinAppSDK is the future is debatable. My experience has shown me that the Windows operating system is at its best when you embrace the Windows API as a whole, including Win32/COM/WinRT, and not just the latest shiny wave. You can see this in action with the popularity of projects like win32metadata and windows-rs that support both WinRT and non-WinRT APIs seamlessly."
From https://github.com/microsoft/cppwinrt/issues/1289#issuecomme...
You will notice the open issues are mostly bug fixes.
So who knows what will even happen to windows-rs crate.
Comment by fbilhaut 4 days ago
Comment by the__alchemist 4 days ago
EGUI bonus: Good integration with WGPU, so you can show 3D things as part of your UI.
Complaining time: Historically, syncing winit, EGUI, WGPU, the binder between GPU and EGUI, and EGUI libs like for file dialogs has been a pain. It gives me anxiety thinking about upgrading versions. That said... the teams are sometimes shockingly fast about syncing their UIs. It is when winnit or WGPU etc make big breaking changes (Often from accumulation over time) where things get hairy!
Comment by Animats 4 days ago
I'm dreading the "upgrade" from wgpu 24 to wgpu 29. I stayed with wgpu 24 for a year so I could get work done. Now I have to fix three programs and all their tests and examples.
Comment by swiftcoder 4 days ago
Winit has had so much churn over time, I hope they settle down at some point.
I can pretty much guarantee that if I try to build a project from 3+ years ago, the old version of winit will not compile on my Mac, and the new version of winit will have a completely different API surface.
Comment by the__alchemist 4 days ago
Comment by swiftcoder 4 days ago
Comment by cosmic_cheese 4 days ago
I wish there were more memory safe compiled languages that focused on ergonomics for cases like this.
Comment by Levitating 4 days ago
Comment by TheMagicHorsey 4 days ago
Comment by nixpulvis 4 days ago
Comment by cosmic_cheese 4 days ago
While imperative retain mode frameworks are technically possible in Rust, my understanding is that there’s a level of unavoidable ceremony and syntax ugliness (unless safety is discarded, which defeats the point of using Rust).
Comment by hazkoulia 4 days ago
Most of the time, I just want some UI. And TUI's are easier / more portable than GUI's.
Comment by thomashabets2 4 days ago
But even though the title of this HN post is wrong, everything else is titled/domained to say that it's about GUIs.
TUIs are great! You can run them on a server, inside a tmux/screen, they don't require a browser or a virtual desktop.
Some things are obviously better as a graphical web app. With WASM I'm less sure that a GUI that is not just a browser app is worth it.
But I'm not a frontend developer, really.
I have a project that requires a GUI. I made it in WASM to run in the browser, and it can decode data packets over radio in real time, while showing fancy visualizations: https://youtu.be/7k0JNT6itaI. 99% of that runs in the browser. Only the RTL-SDR streaming is native.
For my purposes it seems WASM is not performant enough, though, and I'll have to shift more DSP to the server side of the streaming, leaving the UI with just the UI parts.
But I also have some TUI UI code. So much simpler to run remotely, then. No TLS certificates, webserver, etc. Just SSH in and attach to the tmux and see spectrums and graphs with "good enough" dot resolution.
Comment by evereverever 1 day ago
Comment by jph 4 days ago
Also shoutout to ratatui because even though it's technically a TUI not GUI, it's superb.
Comment by DASD 4 days ago
Comment by jordand 4 days ago
Comment by Levitating 4 days ago
Comment by generalenvelope 4 days ago
Comment by jbrownson 3 days ago
This way we don't have to zipper together each "frame" of the output tree trying to figure out which bit goes to which other bit, we get an explicit delta saying "the 5th thing got deleted". You do probably need a language with HKT for this.
I mentioned this to Phil Freeman years ago and he did a prototype in Purescript, but I haven't seen it anywhere else: https://github.com/paf31/purescript-purview
Another thing I'd like to see is a _truly_ immediate mode framework where each widget is a pure function to render it given its state, and it's up to the user to manage the UI state (scroll position, text cursor location, etc), you can mix it in with/ your data model, or whatever. Even egui/etc aren't truly immediate as they need to keep some sort of stable identity for events, UI state and focus. You could of course build a React like thing on top of that, but it would be helpful to have that for experimentation with wildly different state models without having to reinvent the text box and everything yet again. I've started some experimentation w/ this in Haskell and it's going well so far.
Comment by lioeters 3 days ago
A theory of changes for higher-order languages: incrementalizing λ-calculi by static differentiation - https://dl.acm.org/doi/10.1145/2594291.2594304
From the abstract, I get the impression it would require very granular atomic-level language transformations, that are only practical for languages that are designed from the ground up to support creating and applying such deltas. Rust and JavaScript/React seem overly complex for reducing down to that level of granularity, especially the latter for strictly typed and deterministic changes. Maybe a language like Haskell is more suitable, since I've heard that it (or a subset) can be compiled down to typed combinators as primitives.
> probably need a language with HKT
Ah, that sounds related to the thought above, that the technique may be best implemented at the level of language design. Does "HKT" mean "higher kinded types"? Closest I could find was a library for TypeScript: https://majorlift.github.io/hkt-toolbelt/
> _truly_ immediate mode framework where each widget is a pure function
It sounds like the "functional reactive" paradigm, which I think React is loosely based on and probably UI libraries like Imgui and others in Rust also. But none of them are "pure" like you describe because the languages they're built on are not pure all the way to the bottom. (Maybe Rust is, but it's likely too complex to practically "diff" and "patch" not only the data models but the running code incrementally, though I may be misunderstanding.)
Comment by jbrownson 2 days ago
I'm not referring to FRP, just a bunch of functions that can render a frame of UI if you pass in all the "internal state" like cursor position/selection/scroll in addition to the typical UI parameters. Xilem and others are doing a good job of making a lot of things modular, but I haven't seen one actually separate how the UI state is stored from the rendering of the UI.
Comment by evereverever 1 day ago
Comment by Altern4tiveAcc 4 days ago
I still think the ideal solution for Desktop GUIs would be the Qt company developing first class Qt bindings for Node.js (or some other runtime), and allow people to build UIs using web tech with Qt components.
Comment by jordand 4 days ago
Comment by Levitating 4 days ago
Not sure why you want to build desktop GUIs using web tech though.
Comment by coreyoconnor 4 days ago
I suspect if such a filter was applied there would be very few. Probably just the bindings to gtk, qt or appkit.
Comment by NeutralForest 4 days ago
Comment by coreyoconnor 4 days ago
Comment by password4321 4 days ago
Comment by dist-epoch 4 days ago
Comment by Severian 4 days ago
How about some screenshots?
Its very difficult to compare X to Y anywhere on this site. Its just an aggregator, not really an exemplary resource.
Comment by entrope 4 days ago
It looks like it just grabbed the intro to each project's self-description, but blurbs like "Zero-cost ultra-high-performance declarative DOM library using FRP signals" would be worth very little even with screenshots.
Comment by amarant 4 days ago
Cosmic DE is built using iced which is a rust gui library. As far as native, single-platform guis go, I'd say rust is plenty mature.
There's also Bevy, a rust game engine, which, if I'm not mistaken is built on egui(?), and I think supports multiple compile targets.
Between a desktop environment and a game engine, I'd say rust is in a pretty decent place when it comes to gui.
Comment by hitekker 4 days ago
Saying “almost” or “yes” privileges the activity and hype around Rust GUI over actual results. Bevy is the ironic example: a game engine that produces more discussion and code than, so far, one notable & good game.
Comment by mharrig1 4 days ago
Not entirely correct, they have bevy_ui as the in-house example but many people use the third party bevy_egui crate
Comment by NoboruWataya 4 days ago
The best primer on the current(ish) state of GUI programming in Rust, IMO, is this article from 2025 which is linked on that page: https://www.boringcactus.com/2025/04/13/2025-survey-of-rust-...
Comment by brandnewideas 4 days ago
Comment by IshKebab 4 days ago
Comment by yesbabyyes 4 days ago
> Idiotic.
Yes, seeing how simple it seems to redirect to a page playing the sound, instead. ;)
Comment by hitekker 4 days ago
Comment by eviks 3 days ago
At most it could give you an idea about whether some widgets are supported, but even there a list you could filter frameworks by would be worth a thousand screenshots
Comment by zipy124 4 days ago
Comment by qweqwe14 4 days ago
Comment by fragmede 4 days ago
Comment by gordonhart 4 days ago
Not everybody works in big tech.
Comment by hirako2000 4 days ago
Comment by Fraterkes 4 days ago
Comment by ajs1998 4 days ago
Comment by chem83 4 days ago
For desktop app development, if I don’t care about native controls (and what does that mean in Linux or even post-Win32, anyway?) and don’t want to deal with Electron, why not use something a bit more established like Avalonia or Flutter?
Comment by dabinat 4 days ago
Comment by trueno 2 days ago
ive been down this rabbithole with multiple languages, golang, rust, etc what kills me is no one is thinking of making a comprehensive and performant data grid type component. aggrid is my web standard/benchmark for how a table/grid component should look+behave+perform and ive yet to see anything like it in native gui packages. which is odd because we should be able to achieve something like aggrid and make it even more performant from languages like rust/go/etc
Comment by demorro 2 days ago
"The roots aren't deep but the seeds are planted" makes me cringe.
Comment by worik 3 days ago
I started out looking for lightweight X-Windows solutions, for the LLM and me to use. Cutting a long and frustrating story short I settled on SDL2 Rust wrapper
But what a PITA X-Windows is (e.g. need Wayland for some things, but does not work well for others), and my goal is an appliance, not an app.
So in a moment of insight I spent an afternoon getting SDL2 to draw on the Framebuffer and dispensed with X entirely
I highly recommend this approach. Life is so much easier without X-Windows
Comment by jokethrowaway 4 days ago
egui is the clear winner for making desktop applications. I've built a complex application recently (think of it like an AI powered image editor, doing plenty of editor logic and communicating with several python backends for the AI part) and it's been smooth sailing. It would be nice to have a family of components that look native on every platform but nowadays the desktop experience is anyway wildly inconsistent (and web-centric).
Using qt bindings is a good option too, but depending on non rust code means you are more likely to catch some weird crash. My experience with Qt in Rust is years old, so I can't comment on stability.
For frontend development, leptos is really nice and it feels familiar coming from react - but the whole chain is too heavy, your target directory quickly balloons to GBs and that's unacceptable, especially if you have several frontend projects.
I vibe coded a proof of concept leptos (including islands) with a minimal runtime and no dependencies and the size was much more contained. There is margin for improvements but today I would stick with solid.js for frontend development.
The other big hurdle for Rust on the web is the need to compile to wasm. That means that any Rust application will be heavier than a similar app in another JS framework. If we could target js instead of wasm, maybe we could have apps with small bundles.
Comment by Klonoar 4 days ago
egui is, however, one of the most reliable paths in Rust today for building and shipping a desktop app.
Comment by ghosty141 4 days ago
Qt QML is already annoying in C++ since you have to juggle 2 lifetime systems, c++ manual lifetime management and QMLs QML engine (aka gargabe collection).
Comment by IshKebab 4 days ago
I disagree. It's the easiest to get started with, but it looks pretty terrible (poor font rendering especially), and immediate mode has serious downsides.
My current favourite is https://github.com/longbridge/gpui-component
Comment by bananaquant 4 days ago
Comment by nopurpose 4 days ago
Comment by RustSupremacist 3 days ago
Comment by smetannik 3 days ago
Although it's built in Rust, it supports a variety of languages + a custom DSL (like QML).
Comment by Narishma 2 days ago
Comment by pjmlp 3 days ago
Comment by raphlinus 3 days ago
* It's a genuinely hard problem
The state of GUI on Windows is a total mess, very disappointing considering the relative importance and resources that Microsoft has. SwiftUI was a success (Apple is uniquely good at this stuff), but the transition from Cocoa is still not complete. A large part of the reason why it's so hard is that the requirements for different apps vary widely; I think we are spoiled by the relative cohesion
* The infrastructure is in disrepair
A UI is built on top of lots of infrastructural pieces, obviously including graphics and compositing, but also text, accessibility, input handling, and many other things. When you look at support for those layers across platforms, it's like picking up a rock and seeing the bugs crawl. Take compositing: Windows and Mac have excellent compositors, Android and Linux much less so. But even there the features don't line up, Mac doesn't support incremental present (they don't really need to, considering how beefy their chips are, but it's really important on low end Android).
So a lot of the challenge is working around the brokenness across the various platforms. But, good news, there is really excellent progress on all these fronts. We now have solid text layout in Rust, a clear winner on accessibility, and even poor winit is making slow, steady progress.
I'd also like to say, by contrast the web has really been investing in infrastructure, and hides much of the lower level pain from developers. I think that's a major reason Electron is winning so much.
* The computer science is not quite done
We're still in an exploratory phase to figure out the best patterns for writing Rust UI. At the core of that is reactivity, which is at heart incremental computation. Most systems are converging on a hybrid of something generally React like (coarser grain reactivity) with fine-grained signals. I'd like to think there is a Right Answer here and that it's possible to find it.
This feels to me a bit like async. The foundations for async Rust were laid 10 years ago, but it still doesn't feel fully baked. I've seen some exciting recent work about improving the confusing Pin mechanism with something more principled. We'll get there, but it takes time.
I make three predictions:
* Rust UI will continue to improve, as the infrastructure is built out, we try more things, and projects mature. But not quickly.
* If we thought we had a lot of Rust UI projects before, wait til we see what AI wreaks. I predict we'll see dozens of vibe coded Rust UI toolkits.
* In the longer term, we're going to have Rust UI anyway, as browsers are increasingly going to be rewritten in Rust, and apps will be built on Web technology. And that's not just Electron, the modular browser approach pioneered by Blitz is also promising.
Comment by lioeters 3 days ago
Insightful point about how the struggle to converge on a well-designed UI paradigm is related to a larger question of how the industry is still experimenting and exploring the problem space, particularly:
> reactivity, which is at heart incremental computation
Another comment that caught my attention up-thread was talking about "incremental lambda calculus", which is the same question in different words. My impression was that ideally it needs a language-level solution to be able to support "diff" and "patch" not only on the data but the running code, perhaps built from primitives like continuations.
> feels to me a bit like async
Maybe part of the difficulty with reactive UI is fundamentally related to how the language "solves" async, for which there's still no real concensus on the best way to solve it.
Comment by knorker 4 days ago
Comment by octernion 4 days ago
having SSR built in means that the UX is amazing - really complex pages load basically instantly, and it degrades just as easily for folks that haven't loaded the WASM. server functions were also fantastic to work with and easy to reason about. and, the hot reloading they built means that most UX changes are reloaded within a ~few seconds, meaning iterating is fast and (mostly) painless.
the native component library dioxus has (dioxus-primitives) is... sparse so i did have to build out a hundred or so basic components, but i've done that across various stacks 5-6 times now over my career so it's a fun little journey at this point. for the components they do provide, the quality bar is very good.
Comment by amelius 3 days ago
Comment by bschwindHN 3 days ago
I take your question to basically mean "can it expand or shrink a path?" and "can it use a path as a clipping mask?"
Or did I misunderstand and you want to only show the image within the 2px sliver itself?
Comment by amelius 3 days ago
Comment by bschwindHN 2 days ago
Comment by aatd86 4 days ago
Comment by mahirsaid 4 days ago
Comment by sourcegrift 4 days ago
Comment by rjh29 4 days ago
Comment by sourcegrift 4 days ago
Comment by sgt 4 days ago
My only question is - say if one uses Rust, is flutter_rust_bridge the way to go?
Comment by chews 4 days ago
Comment by sgt 4 days ago
Comment by aquariusDue 4 days ago
All that is to say that I'm glad there's another way to get Rust on mobile aside from stuff like flutter_rust_bridge.
[0] https://github.com/woboq/qmetaobject-rs
[1] https://www.rubdos.be/2026/04/17/my-sailfish-os-journey-apps...
Comment by laladrik 4 days ago
Unfortunately, I had the expectation that it should be as simple as making an HTML page. My failure to find a library or a framework to make GUI application made me learn a lot about how GUI works. I realized that making GUI for browser and for desktop are quite different problems. Browser makes easy what's difficult having a desktop oriented GUI framework - text rendering. However, the situation is fair the other around. GUI framework makes easy what's difficult in a browser - drawing arbitrary shapes. As a result, a web-frontend programmer struggles to figure out how to write some text having something like Qt, a GUI programmer tries to find the API to the bitmap in a browser.
It's fair noticed in the previous comments that a GUI framework brings a lot. That's because the problem is complex:
1. Create a window
2. Communicate with the window compositor (you do in WinAPI too btw). How to access the system tray and the child window.
3. Communicate with the operating system.
4. Handle the user input. Callback vs event streams. The user has 4 keyboards for some reason.
5. Rendering. Subpixels, shapes, different DPI. The user has 6 monitors.
6. Text rendering.
7. Widgets. Where probably the most difficult part is to make a textbox, because it involves the solutions of all previous steps.
The steps above touch only the visual part. There's also audio, accessibility, somebody wants the GUI framework to solve the networking.
After all of this research, I picked simply SDL for my project.
1. It's easy to compile.
2. It's small.
3. It relies on the subjectively common dependencies.
4. It's fairly straightforward to upgrade. Given that, you have to create a lot from scratch the part with updating is smaller comparing to a Qt-based solution.
5. It has batteries. My favorite is SDL_ttf which allowed me recently to implement selection of the text which is quite a bit through towards a textbox.
Having a project on SDL requires a lot of knowledge, but not a lot of code.
Comment by achillean 3 days ago
Comment by satvikpendem 4 days ago
Comment by mahirsaid 4 days ago
Comment by holgerno 4 days ago
Comment by Surac 4 days ago
Comment by theusus 4 days ago
Comment by bbkane 3 days ago
Comment by 12_throw_away 3 days ago
Comment by theusus 1 day ago
Comment by Jyaif 4 days ago
Comment by 15155 3 days ago
Comment by icemic 3 days ago
For the past few years, I’ve been trying to build my ideal visual novel engine, and I’ve come to realize that I’ve largely been implementing a general-purpose 2D GUI solution.
The project README is:
https://github.com/Icemic/moyu/blob/main/README_EN.md
Just like react-canvas back in the day, I combined wgpu and quickjs, and used the latter to run React. Of course, there’s no react-dom involved here; I have a custom renderer built with reconciler that binds to elements like `<sprite>` or `<text>` that I implemented in Rust.
Today this reminded me that maybe I should submit my project to arewegameyet and areweguiyet…
Recently I’ve been trying to add a visual editor to it—you know, similar to the relationship between RPG Maker MV and Pixijs. As a former frontend engineer and current Rust client engineer, I felt I had plenty of options. First, I looked into GPUI, and I have to say it’s a fantastic project, but unfortunately, it lacks the essential components I need to build my application. In the end, I had to go with a traditional solution like Tauri+ShadCN because I want to focus on the project itself.
Comment by igtztorrero 4 days ago
Comment by deepsun 3 days ago
As in other areas where business outcomes of a software is more important than efficient memory management. I don't like Electron, but its popularity just makes it obvious that nobody cares about RAM usage in the GUI area.
Comment by b33j0r 4 days ago
That’s crazy. It’s still better than the UX’s that game engine designers think work. Sure bro, show me your File Open/Save Dialog and tree view. Show me your text editor (nicely done, zed)