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 Matt Gumbley

I'm a bit nervous about the fact it uses an external crate for a11y, so it's not on by default, and it says some widgets have a11y support, so it's not clear if all of them do. Also can one do list views? I haven't seen them on the list of widgets.

PS Still trying to build Qt, got failures due to: lack of ATL, mismatch in architecture, and now some weird openssl link failure.

in reply to Matt Gumbley

I've been trying FLTK after running out of other options. I can see why you recommended it, the building situation is so much easier, just cargo add with the bundle feature and it's done.

Unfortunately the accessibility implementation isn't good. I've only given a quick look, but the example provided already doesn't work well. Specifically, the screen reader re-reads every time an input field is changed, so it reads the entire input whenever a new character is entered.

However if one day the accessibility situation improves I will definitely look into it again. It seems much easier to deploy.