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

Vendor windows-sys crate #837

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Vendor windows-sys crate #837

merged 1 commit into from
Jul 26, 2023

Conversation

NobodyXu
Copy link
Collaborator

to avoid additional dependencies bring in by windows_sys, espeically to build-dependencies.

@thomcc
Copy link
Member

thomcc commented Jul 26, 2023

It's not really vendoring so much as using their windows-bindgen tool...

Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you.

gen-windows-sys-binding/src/main.rs Outdated Show resolved Hide resolved
@thomcc
Copy link
Member

thomcc commented Jul 26, 2023

I guess const fn transmute is 1.56? I don't care that much about MSRV so I'd be okay bumping it. That's still very conservative anyway.

@NobodyXu
Copy link
Collaborator Author

I guess const fn transmute is 1.56? I don't care that much about MSRV so I'd be okay bumping it. That's still very conservative anyway.

I've replaced use of it with addr as *mut T, it will still work just a bit more derived from current std implementation, though it doesn't make much of a difference until std implements strict_provenance.

@NobodyXu
Copy link
Collaborator Author

It's not really vendoring so much as using their windows-bindgen tool...

Well, anyway we are able to replace the massive windows-sys with 188 lines of rust.

to avoid additional dependencies bring in by `windows_sys`, espeically
to `build-dependencies`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@thomcc
Copy link
Member

thomcc commented Jul 26, 2023

This looks great. Thanks for all your work.

@thomcc thomcc merged commit b388631 into rust-lang:main Jul 26, 2023
16 checks passed
@thomcc thomcc mentioned this pull request Jul 26, 2023
@NobodyXu NobodyXu deleted the vendored/windows-sys branch July 26, 2023 07:22
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