Skip to content

Conversation

@Ortham
Copy link
Contributor

@Ortham Ortham commented Oct 10, 2025

The winapi and windows-sys crates both provide bindings to Windows APIs, but winapi is a third-party crate and has been unmaintained for 4 years, with its last release over 5 years ago, while windows-sys is an actively-maintained crate from Microsoft.

My main motivation for this change is to deduplicate Windows API bindings in my dependency tree: pelite is the last of my transitive dependencies that depends on winapi instead of windows-sys, and as far as I can tell the Rust ecosystem is generally moving to the latter (or its higher-level sibling, the windows crate), as windows-sys has more than double the all-time downloads (despite being newer than winapi's most recent release). Although winapi still has more direct dependents, windows-sys + windows together have more, so I think it's increasingly likely that others will be be in the same situation as me.

I considered depending on the windows crate instead, but it doesn't really add much value for pelite's usage, and takes longer to build.

I've also replaced a few as casts with ptr::cast() calls as the latter is slightly less dangerous, and I've adjusted a piece of pointer arithmetic to preserve provenance.

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.

1 participant