Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies to latest upstream (notably winit -> 0.30, wgpu -> 0.20, accesskit -> 0.16) #65

Merged
merged 14 commits into from
Jul 14, 2024

Conversation

maaku
Copy link
Contributor

@maaku maaku commented Jul 10, 2024

As noted in a vger-rs pull request, I'm currently investigating use of rui for a cross-platform application supporting desktop + mobile + web, and built on winit and wgpu. This brings rui's dependencies up to the latest released version, which are the same I'm using in my app.

Note the diff is quite large! The winit API in particular changed significantly between 0.28 and 0.30. I've tried to keep the same business logic, and the API is unchanged even though some upstream improvements might want to be reflected in rui's API.

Of particular note, the way winit handles keyboard input has been completely rewritten and supports significantly more than is exposed by rui. I have updated the rui() application runner to use these new APIs, but with the same old exposed input interface. One area in which this might actually be an issue is with multi-code-point character input. Rui's API sends a single character per keystroke, whereas winit sends a string. This is because some characters in some input schemes may not reduce down to a single Unicode glyph, instead using combining character codes. The new interface (which uses winit to do key -> character transformation rather than hard coding it as rui did before) will just send on only the first Unicode code point.

Also: the vger dependency is hard-coded to the latest trunk commit as of the time of this writing, rather than a proper crates.io release. Vger should probably have a 0.3 release (since updating wgpu is breaking for downstream apps), and then rui semver-pegs to that.

@wtholliday
Copy link
Contributor

I'll release a new version of vger to crates.io :)

@wtholliday
Copy link
Contributor

Oh whoops I did 0.2.9 for vger thinking that its own API didn't change. Guess I'll do a 0.3 now

@wtholliday
Copy link
Contributor

Ok 0.3.0 is up (I yanked 0.2.9). Go ahead and update your PR :)

@maaku
Copy link
Contributor Author

maaku commented Jul 10, 2024

Updated :)

@wtholliday
Copy link
Contributor

Hey @maaku, if you run the gallery example and try the text editor widget, typing a letter will enter two letters (on macOS at least).

@maaku
Copy link
Contributor Author

maaku commented Jul 13, 2024

I didn't realize in the refactor that the keyboard events are only passed on when the event is a key press. Fixed. I can rebase when it's ready for merge.

@wtholliday
Copy link
Contributor

Seems good now! After your rebase is it ready to merge?

@maaku
Copy link
Contributor Author

maaku commented Jul 14, 2024

Yeah, ready for merge. I just force-pushed a rebased fix.

@wtholliday wtholliday merged commit 708a3d0 into audulus:main Jul 14, 2024
2 checks passed
@wtholliday
Copy link
Contributor

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants