Skip to main content


Spent the last 6 hours trying to get a hello world equivalent gui window with a button on rust under windows.

This task which one might think is simple ended up taking literal hours and still hasn't been achieved because: the tutorials for gtk on windows and rust suggest putting msys2 bin directory on the path. This causes rust to fail to build correctly because it uses the wrong gcc and linkers.
Afterwards I managed it by using the appropriate environment variables.
But then I found out the dynamically linked libarries weren't found. I tried getting a way to copy them but it turned out to be too much work so I just moved the executable to the same dir.
Only to find out that gtk4 has no accessibility on Windows. Not bad accessibility, not accessibility that needs to be turned on. No. Accessibility. At all.
So then I decided to try Qt, which wants me to create an account to get an installer. Absolute no.
Got the 1.5gb sources and trying now to get an off-line installer out of it.

To get a fucking window with a button in it.

I don't think it's unreasonable for me to say this state of affairs is complete bullshit, and that most people with a normal level of motivation would have found plenty of opportunities to have given up. I still might.

(Not using NWG because tying the data to the GUI elements is non-trivial, it seems to require copying a lot and using twice the memory.)

#a11y #rust #gui #windows

Peter Vágner reshared this.

in reply to modulux

something you might consider: github.com/iced-rs/iced

I haven’t used it just seen ppl talk about it more than gtk or qt lately.

in reply to dana

I gave it a quick look and it seems it has no accessibility support. This means it doesn't exist. I can't exactly use a GUI toolkit if I can't navigate the programs I produce. Thanks for the suggestion.
in reply to modulux

Now I'm having to build Qt to avoid getting an account to get an installer.

It won't build with the CMake version that comes with my VS 19, which I only have for the sake of getting access to the rust msvc toolchain.

I think tomorrow I might just push a rock up a mountain instead.

in reply to modulux

Spoilers: that didn't work either.

After about 10 minutes of config, cmake --build . gives eme an error because ninja can't do multiple outputs.

Apparently in order to get a window with a button, that runs accessibly on windows, from rust, I must first create the universe.

I give up.

in reply to modulux

Alright, I've checked out egui, through eframe, and slint. Both work for some values of work. Unfortunately eframe is quite limited in terms of the widegts it offers, and the direct mode seems a little unsuited to my application idea. Slint fits better, but it's still missing a lot of widegts I need, such as menu bars.
in reply to modulux

Or, depending on how complex the GUI will be in the end, egui could work as well, but that's much more simple than Gtk or Qt.
in reply to Lukáš Tyrychtr

Yes, I was looking at that as well through eframe, but it doesn't seem to support some of the widget types I need. Slint gets closer but is still missing menus.
in reply to modulux

Yeah, I saw your egui exploration post some time after I replied to the first. :-)
in reply to modulux

I thought @matt's work to renovate the Linux accessibility stack was going to result in some level of GTK accessibility on Windows (because of AccessKit), but I haven't heard any updates about the project in a while. And I could also be completely wrong.
This entry was edited (2 days ago)
in reply to James Scholes

I've no idea if it will, but as far as I've been able to track, it hasn't so far.
in reply to modulux

podrías usar wxget? En windows las interfaces hechas con eso son accesibles.
in reply to Juan CBS

No es mala idea, el problema es que no encuentro librerías para usar WX en Rust que funcionen en Windows, por lo menos en principio. A lo mejor hay algo que no he localizado.
in reply to modulux

In case you were wondering why most people build desktop apps in Electron in 2025.
in reply to Mikołaj Hołysz

To be fair, if I didn't insist on using rust I could have been done hours ago, with python and wx widgets or py-qt or whatever.

But yes, these build systems are getting really complex.

in reply to modulux

I mean, PyQT kind of sucks on the accessibility side in some places, or at least did the last time I tried. WX makes your app look extremely Windows-like if you run them on the Mac, not to mention its abhorrent and unpythonic style.
in reply to Mikołaj Hołysz

I wasn't aware of a11y issues with py-qt. Not so fussed about how things look, much less on the mac, for obvious reasons. But, sure, if someone wants to make multiplatform stuff that looks similar it does get more involved.
in reply to modulux

I think it's just QT, not necessarily PyQT.

Though things have significantly improved on that front recently, see e.g. TeamTalk, so this might no longer be that relevant.

in reply to Mikołaj Hołysz

Oh, Qt has improved, as far as I know. At least I've used some Qt programs that seemed to be alright. Really disappointed that gtk's accessibility is limited to linux though.
in reply to modulux

it's not just about how things look visually, even if you're using VO, you get yes/no buttons instead of something like "keep"/"delete", very Windows-like shortcuts etc.

You can probably fix this if you go the extra mile, though.

in reply to Mikołaj Hołysz

One program I've seen, although I'm not totally sure what Toolkit it was using, used option+f4 to quit instead of command+q. That's what I mean by "apps looking Windows-like."
in reply to Mikołaj Hołysz

Ah yeah, functional issues. I never got along with macs is the thing, so I wouldn't really think of producing software for them. Of course if you can let the library deal with it that's great.
in reply to modulux

just don't develop for Windows. Or maybe use one of the rust-native frameworks like iced or slint.
in reply to Katzenmann

Iced has no accessibility. Thanks for the suggestion of Slint, that might work. Unfortunately up to now windows has the best accessibility around, so that makes it imperative for me to keep using it. Hopefully this changes one day.
in reply to Seg

Mm, from a quick look at eframe it seems it's quite limited about the sort of widgets it supports, but maybe I need to read more docs. Looking for things like listviews, menu bars, etc.
in reply to modulux

Gtk .18 will have a11y support on Windows thanks to the Accesskit backend, so, just wait a few weeks or compile it from source? Did not try that on Windows yet, though.
in reply to Lukáš Tyrychtr

@Lukáš Tyrychtr @modulux GTK 4.18 that is.
Still it's a shame #a11y work by @Matt Campbell is not continuing the way it has been envisioned from the start.