Skip to content

Conversation

@MarijnS95
Copy link
Member

@MarijnS95 MarijnS95 commented Mar 24, 2022

Depends on #106
Fixes #62

As has long been planned and discussed we'd like to get rid of the ancient and barely maintained winapi crate, in favour of something more modern: windows-rs is actively developed and maintained by Microsoft themselves, and generated out of header metadata rather than written by hand. Besides, it provides a more sophisticated and safer API for dealing with objects (abstracting away return types behind Result, hiding COM lifetime management, etc).

The choice for the "heavier" windows crate over windows-sys is fairly obvious: DirectX APIs are built on the COM object model which is completely unsupported in windows-sys making us unable to perform any method calls. Besides, the windows-sys crate does very little to make the API more convenient nor safer to use, effectively taking us a step back from winapi instead of a step forward.

@MarijnS95 MarijnS95 force-pushed the windows-rs branch 3 times, most recently from 8f9595d to 6bb9b27 Compare March 25, 2022 09:05
@MarijnS95 MarijnS95 force-pushed the windows-rs branch 2 times, most recently from 35e04bf to eded1e6 Compare May 18, 2022 14:50
MarijnS95 and others added 3 commits May 18, 2022 17:05
As has long been planned and discussed we'd like to get rid of the
ancient and barely maintained `winapi` crate, in favour of something
more modern: `windows-rs` is actively developed and maintained by
Microsoft themselves, and generated out of header metadata rather than
written by hand.  Besides, it provides a more sophisticated and safer
API for dealing with objects (abstracting away return types behind
`Result`, hiding COM lifetime management, etc).

The choice for the "heavier" `windows` crate over `windows-sys` is
fairly obvious: DirectX APIs are built on the COM object model which is
completely unsupported in `windows-sys` making us unable to perform any
method calls.  Besides, the `windows-sys` crate does very little to make
the API more convenient nor safer to use, effectively taking us a step
back from `winapi` instead of a step forward.
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.

Switch over to windows-rs

3 participants