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

Open
repi opened this issue Sep 20, 2019 · 5 comments
Open

Migrate away from winapi 0.2 #42

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

Comments

@repi
Copy link
Member

@repi 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:

  • iovec:: This is the most important as huge ecosystem depend on this small crate. PR fix filed
  • app_dirs: Abandoned crate, switched to app_dirs2 instead and PR fix was merged & published in 7 minutes (!)
  • mio: In-progress v0.7 is using latest winapi, v0.6 will stay on winapi 0.2. May just have to wait for v0.7?
  • notify: Unmaintained crate, leaf dependency so less important but should find alternative or get it updated. Related PR: notify-rs/notify#217
  • wasmer-runtime-core: From page_size. Is there a more modern/maintained equivalent that they can switch to?

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

This comment has been minimized.

Copy link

@memoryruins 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

This comment has been minimized.

Copy link
Member Author

@repi repi commented Sep 21, 2019

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

@repnop

This comment has been minimized.

Copy link

@repnop repnop commented Sep 21, 2019

notify PR has been merged :)

@crlf0710

This comment has been minimized.

Copy link

@crlf0710 crlf0710 commented Sep 23, 2019

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

@hrydgard

This comment has been minimized.

Copy link
Member

@hrydgard hrydgard commented Nov 11, 2019

Fixing wasmer: wasmerio/wasmer#948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.