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

Migrate away from winapi 0.2 #42

Closed
9 tasks done
repi opened this issue Sep 20, 2019 · 15 comments
Closed
9 tasks done

Migrate away from winapi 0.2 #42

repi opened this issue Sep 20, 2019 · 15 comments
Labels

Comments

@repi
Copy link
Contributor

repi commented Sep 20, 2019

Thanks to the new Cargo nightly -Z timings I saw that our 3.5 min Windows release build was spending 65 seconds building just the old winapi 0.2 crate.

The wall time itself, while very high, is not a major problem as this was a larger from scratch build and lots of cores available, but what the timings clearly showed was that it pushed out a lot of build steps because there were tons of small and big crates that had dependencies on winapi 0.2 directly or indirectly and as such couldn't even start until that had been built.

So want to fully get rid of winapi 0.2 crate in our builds and migrate the crates that we are using to the faster and better winapi 0.3 or, in some cases, remove them.

Current crates that use (directly or indirectly) that uses winapi 0.2:

Once we have those resolved:, we want to allow be able to disallow winapi 0.2 in our projects:

@repi repi added the crate label Sep 20, 2019
@memoryruins
Copy link

memoryruins commented Sep 21, 2019

Noticed similar results trying out -Ztimings on rust-analyzer while on windows http://gistpreview.github.io/?4a6eafbb1f4786c534143c959876f38f cc @matklad

For notify, it directly uses winapi 0.3; however, its dep kernel32-sys pulls in winapi 0.2. I mentioned this to @rep-nop, and they saw that the calls to kernel32-sys could be easily replaced.
I believe they are working on a PR now. notify-rs/notify#217

p.s. notify is currently looking for new maintainers notify-rs/notify#209

@repi
Copy link
Contributor Author

repi commented Sep 21, 2019

@memoryruins Awesome thanks! notify is a good library, hope it finds a new good home

@repnop
Copy link

repnop commented Sep 21, 2019

notify PR has been merged :)

@crlf0710
Copy link

Maybe it's possible to do the semver tricks and make 0.2 crates reexports of 0.3 one

@hrydgard
Copy link

Fixing wasmer: wasmerio/wasmer#948

@hrydgard
Copy link

hrydgard commented Dec 20, 2019

The page_size maintainer finally woke up and merged my pull request, so as soon as wasmer upgrades to a new page_size, we'll be down to a single remaining dependency on winapi 0.2! (mio)

Elzair/page_size_rs#1

@repi
Copy link
Contributor Author

repi commented Dec 20, 2019

Nice, and mio 0.7-alpha.1 that was released a few days ago has upgraded to winapi 0.3 also. Though likely will take a while for the rest of the stack to use it.

https://tokio.rs/blog/2019-12-mio-v0.7-alpha.1/

@repi
Copy link
Contributor Author

repi commented Mar 4, 2020

mio 0.7 has now been released! Just waiting for tokio to update and use it now and then this can finally be closed and we won't need winapi 0.2 anymore!

@repi
Copy link
Contributor Author

repi commented Jun 4, 2020

Still waiting for tokio to actually upgrade to mio 0.7. Tracked in tokio-rs/tokio#1190

Also noticed that the old winapi 0.2 doesn't support building for aarch64-pc-windows-msvc (Windows on Arm), so this is a blocker for that.

@Jake-Shadle
Copy link
Member

Not that I don't mind getting rid of 0.2, but is Windows Arm actually a relevant target?

@repi
Copy link
Contributor Author

repi commented Jun 4, 2020

@Jake-Shadle in general no 😀 but something I'm personally just curious about experimenting with

@hrydgard
Copy link

hrydgard commented Jun 5, 2020

Windows Arm might become important in the coming years. Or not. Time will tell.

It's unclear what's holding Tokio up from upgrading though...

@repi
Copy link
Contributor Author

repi commented Oct 15, 2020

New tokio 0.3 released today that finally does upgrade mio to 0.7 🎉 https://github.com/tokio-rs/tokio/blob/master/tokio/CHANGELOG.md#030-october-15-2020

now just need hyper, h2, reqwest, tonic, tower to be upgraded to use and we are good to go :)

@repi
Copy link
Contributor Author

repi commented Jan 18, 2021

Now finally with the major tokio upgrades to 1.0 and mio they no longer bring in winapi 0.2. Unfortunately found 2 more ecosystem dependencies that still bring in old winapi 0.2: winit (event latest 0.24) and notify 0.4 (unmaintained). Soo close, but not solved yet.

@bnjbvr
Copy link

bnjbvr commented Oct 15, 2021

notify and winit now use both mio 0.7+, and while we're not using the latest winit in our project yet, the dependency on winapi 0.2 has been removed away from all these crates, so I think we can finally close this! 🥳

@bnjbvr bnjbvr closed this as completed Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants