Skip to content

Adopt windows-rs - #311

Merged
Amanieu merged 1 commit into
Amanieu:masterfrom
clemenswasser:adopt-windows-rs
Jan 8, 2022
Merged

Amanieu merged 1 commit into
Amanieu:masterfrom
clemenswasser:adopt-windows-rs

Conversation

@clemenswasser

@clemenswasser clemenswasser commented Jan 8, 2022 •

Copy link
Copy Markdown
Contributor

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

bjorn3 commented Jan 8, 2022

Copy link
Copy Markdown
Contributor

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

@clemenswasser

clemenswasser commented Jan 8, 2022 •

Copy link
Copy Markdown
Contributor Author

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

Amanieu commented Jan 8, 2022

Copy link
Copy Markdown
Owner

Thanks!

@madsmtm

madsmtm commented Jan 13, 2022

Copy link
Copy Markdown

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

@ilslv ilslv mentioned this pull request Mar 10, 2022
8 of 15 tasks
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.

4 participants