by jpeeler · 2y ago · 0 comments
I've been looking for a way to run GUI applications remotely for a while, specifically on a wlroots compositor. Projects like this (maybe one day) and https://github.com/udevbe/greenfield are interesting since they essentially make access universally accessible.
- https://floooh.github.io/visual6502remix/
- (start the emulators by clicking the little "UI" icon to get the debugger UI) https://floooh.github.io/tiny8bit/
- (start by clicking the little "UI" icon) https://floooh.github.io/sokol-html5/
Platform abstraction is handled through the sokol headers: https://github.com/floooh/sokol
Dear ImGui is small and fast enough for running in browsers (it will add up to a few hundred KBytes of WASM byte code). If this is too much "bloat", there are smaller, but also less powerful alternatives like microui: https://github.com/rxi/microui)
Dioxus [1] and about a dozen other libraries are attempting to be write-once, deploy web, mobile, desktop with native performance. They adopt a React-like component UI.
The Rust ecosystem is full of stuff. There are lots of different approaches too - immediate mode drawing, canvas drawing [2], etc.
Choosing a winner is the hard part. There are too many projects and no clear community-elected leader.
I think most languages that have been around for more than five years have some kind of GUI framework that'll run in the browser.
Very worst-case scenario, you could compile a Windows executable and run them in BottledWine :P
I wrote a simple chord finder for learning to play guitar with it pretty quickly [2], and would use it again to solve a problem like this, though I'm told immediate mode UI frameworks aren't good for things other than quick prototypes, or in my case, scratching a quick itch.
it's not impossible. in fact at an API level, React is an immediate mode gui written on top of a retained mode gui. but it's that retained mode that's providing all the features above.
which immediate mode GUIs have you used that cover these features?
My concern was moreso that there is nothing inherent to immediate mode that prevents all of those things. Someone just has to build it.
RTL tends to be more of a layout problem and has little to do with UIs. Most of my experience with immediate mode UI frameworks is in proprietary applications. I will say that we had no issues with localization and we integrated well with screen readers though none of this was in a platform independent manner. And that's usually the root of all of these issues.
[1] https://github.com/leptos-rs/leptos, https://github.com/dioxuslabs/dioxus
[2] https://yew.rs/
[3] https://github.com/flosse/rust-web-framework-comparison#fron...
ImGui makes a specific design choice and isn’t amazingly documented. I don’t think it’s a good choice for larger scale apps. But good for tools or UIs in games, etc.
Accessibility is a nightmare with pretty much anything skipping browser layout of course.