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

Update windows-sys 0.52 #1725

Closed
wants to merge 2 commits into from
Closed

Update windows-sys 0.52 #1725

wants to merge 2 commits into from

Conversation

kennykerr
Copy link

This is the first update to the windows-sys crate in 8 months. https://github.com/microsoft/windows-rs/releases/tag/0.52.0

@Thomasdezeeuw
Copy link
Collaborator

@kennykerr it seems it contains breaking changes

@kennykerr
Copy link
Author

kennykerr commented Nov 17, 2023

Yes, there were some WDK changes. I can fix those but I just noticed that mio hasn't updated MSRV so it may not be practical just yet. Much like tokio, the windows-sys crate now expects 1.56 to avoid a number of compatibility issues.

@Thomasdezeeuw
Copy link
Collaborator

We'll have to discuss the MSRV, as we need to support Tokio TLS, which has, or had, a MSRV of 1.46

@kennykerr
Copy link
Author

I pushed the WDK changes. The mio crate uses some early support for the WDK and windows-sys 0.52 now has significantly improved WDK support.

Anyway, I'll probably just close this PR and you can revisit when you're ready to bump your MSRV.

@kennykerr kennykerr closed this Nov 17, 2023
@kennykerr
Copy link
Author

@Thomasdezeeuw just FYI the NtCancelIoFileEx function is provided by windows-sys 0.52:

/// This is an undocumented API and as such not part of <https://github.com/microsoft/win32metadata>
/// from which `windows-sys` is generated, and also unlikely to be added, so
/// we manually declare it here
fn NtCancelIoFileEx(
FileHandle: HANDLE,
IoRequestToCancel: *mut IO_STATUS_BLOCK,
IoStatusBlock: *mut IO_STATUS_BLOCK,
) -> NTSTATUS;

@kayabaNerve
Copy link

Is there a location msrv is actively being discussed? I'd love to see this change be effected.

@Thomasdezeeuw
Copy link
Collaborator

Is there a location msrv is actively being discussed? I'd love to see this change be effected.

Not actively any more. The problem is Tokio LTS, which doesn't support windows-sys's MSRV. If I recall correctly it's supported until March 2024 after which we can update to windows-sys v0.52's MSRV.

Some related discussions:

@kayabaNerve
Copy link

Hm.

This PR is purely import-based, with no logic/actual type changes.

Would a PR be accepted in the form of a build script which configures which windows-sys to pull in? 0.52 if >= Rust 1.56, else 0.48? That'd prevent de-duplication of windows-sys in users' trees while also not being a breaking change.

@Thomasdezeeuw
Copy link
Collaborator

Hm.

This PR is purely import-based, with no logic/actual type changes.

No, v0.48 -> v0.52 has breaking changes, see the failing CI: https://github.com/tokio-rs/mio/actions/runs/6905918873.

Would a PR be accepted in the form of a build script which configures which windows-sys to pull in? 0.52 if >= Rust 1.56, else 0.48? That'd prevent de-duplication of windows-sys in users' trees while also not being a breaking change.

I don't really want to complicate Mio further.

I've started a thread on Discord to discuss this further: https://discord.com/channels/500028886025895936/627986131702644744/1181530156528041984.

@kayabaNerve
Copy link

Got it. Thanks for all the answers.

kayabaNerve added a commit to serai-dex/serai that referenced this pull request Dec 6, 2023
Updates off a yanked version of zerocopy, fixing the failing deny CI.

Bites the bullet on windows-sys 0.52. While I was hoping to update everything
at once, unfortunately tokio won't update until March (see
tokio-rs/mio#1725). I don't want to withold these
updates for that long.
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.

3 participants