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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt windows-rs #311

Merged
merged 1 commit into from Jan 8, 2022
Merged

Adopt windows-rs #311

merged 1 commit into from Jan 8, 2022

Conversation

clemenswasser
Copy link
Contributor

@clemenswasser clemenswasser commented Jan 8, 2022

Change from using the unofficial winapi bindings, to using the official windows bindings from Microsoft.
I have also a PR open at winit: rust-windowing/winit#2057
They suggested that parking_lot (dependency of winit) should also be switched over to windows-rs.
For this port I am using the more lightweight and lower level windows-sys (which is closer to winapi).
For me build times are faster with windows-rs 馃帀
Before(winapi 1.19s, total time 2.2s):
winapi_parking_lot
After(windows-sys 0.94s, total time 1.7s):
windows_parking_lot

@bjorn3
Copy link
Contributor

bjorn3 commented Jan 8, 2022

Several other crates also compile faster in the second compile. Are you sure this isn't the cpu changing frequency?

@clemenswasser
Copy link
Contributor Author

clemenswasser commented Jan 8, 2022

Several other crates also compile faster in the second compile. Are you sure this isn't the cpu changing frequency?

It is deterministically faster.
When I build it multiple times, it's always winit ~1.94s and windows-rs ~1.58s.
After the first few builds it is really stable.

@Amanieu Amanieu merged commit 8019473 into Amanieu:master Jan 8, 2022
@Amanieu
Copy link
Owner

Amanieu commented Jan 8, 2022

Thanks!

@madsmtm
Copy link

madsmtm commented Jan 13, 2022

Note that this might be an MSRV bump (at least when the windows crate had an MSRV, see microsoft/windows-rs#1426 (comment))

MarijnS95 added a commit to MarijnS95/imgui-rs that referenced this pull request Mar 15, 2022
`parking_lot` now uses windows-rs's `windows-sys` crate, officially
developed and vetted by Microsoft - the bindings are autogenerated from
metadata and faster to compile too.

See also Amanieu/parking_lot#311.
MarijnS95 added a commit to MarijnS95/imgui-rs that referenced this pull request Mar 15, 2022
`parking_lot` now uses windows-rs's `windows-sys` crate, officially
developed and vetted by Microsoft - the bindings are autogenerated from
metadata and faster to compile too.

See also Amanieu/parking_lot#311.
dbr added a commit to imgui-rs/imgui-rs that referenced this pull request Mar 19, 2022
`parking_lot` now uses windows-rs's `windows-sys` crate, officially
developed and vetted by Microsoft - the bindings are autogenerated from
metadata and faster to compile too.

See also Amanieu/parking_lot#311.
ctrlcctrlv pushed a commit to MFEK/imgui.rlib that referenced this pull request Sep 24, 2022
`parking_lot` now uses windows-rs's `windows-sys` crate, officially
developed and vetted by Microsoft - the bindings are autogenerated from
metadata and faster to compile too.

See also Amanieu/parking_lot#311.
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

4 participants