Skip to content

Bump windows to 0.62 and thiserror to 2 - #28

Closed
T-RN-R wants to merge 3 commits into
Rubensei:masterfrom
T-RN-R:bump-windows-deps
Closed

T-RN-R wants to merge 3 commits into
Rubensei:masterfrom
T-RN-R:bump-windows-deps

Conversation

@T-RN-R

@T-RN-R T-RN-R commented Mar 10, 2026

Copy link
Copy Markdown

Summary

  • Bump windows crate from 0.48 to 0.62 in both windivert-sys and windivert
  • Bump thiserror from 1 to 2 in both crates
  • Adapt to all breaking API changes (BOOL moved to windows::core, HANDLE.0 is now *mut c_void, several Win32 functions now return Result<()>, Error::from_win32() replaced by Error::from_thread())
  • Fix pre-existing dangling pointer in uninstall() MaybeUninit usage
  • Bump MSRV to 1.81 (required by thiserror 2)

Test plan

  • cargo check --features vendored compiles cleanly with no warnings
  • cargo check --features static compiles cleanly
  • cargo test --features vendored passes
  • CI passes on windows-latest with msvc and gnu toolchains

🤖 Generated with Claude Code

M and others added 3 commits March 10, 2026 12:39
Migrate both windivert-sys and windivert to windows 0.62 and thiserror 2,
adapting to breaking API changes:

- BOOL moved from Win32::Foundation to windows::core
- HANDLE.0 changed from isize to *mut c_void
- TlsSetValue, ControlService, CloseServiceHandle now return Result<()>
- Error::from_win32() replaced by Error::from_thread()
- Fix dangling pointer in uninstall() MaybeUninit usage
- Bump MSRV to 1.81 (required by thiserror 2)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HANDLE changed from isize to *mut c_void in windows 0.58+, which
removes auto Send/Sync. Restore them with explicit unsafe impls
since Win32 kernel handles are safe to send/share across threads.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Rubensei

Rubensei commented Mar 10, 2026 •

Copy link
Copy Markdown
Owner

Hi

At the moment I would prefer not bumping the msrv on master, I'd like to keep it as a reference for the latest stable public version. Also the changes have already been implemented in the dev branch and published in the 0.7 pre-relase versions

@Rubensei Rubensei closed this Mar 10, 2026
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.

2 participants