-
Notifications
You must be signed in to change notification settings - Fork 23
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
Consider migration from winapi-rs -> windows #128
Comments
It might be useful to use windows-bindgen to generate bindings only for the symbols we need. (Example setup from chrono: chronotope/chrono#1202.) |
I also have a bit of experience with this, and I've taken different approaches in different crates. In
In this crate, I imagine that we would only need to codegen |
FWIW I don't think they are wrong, I just think they require some extra care to use by default. Writing the constants as Rust strings is a lot more succinct, makes printing error messages and types easier, etc. |
The problem that's been discussed is that windows-sys is a sizable download, so if you depend on a smallish part of it there's a bunch of effort wasted downloading and unpacking all that code. |
It's not a big deal -- I'd be okay with taking a dependency on windows-sys since this needs quite a bit more surface area than chrono (and is also itself a higher-level sort of library). |
I think the situation might be a bit more nuanced: rustsec/advisory-db#2031 |
While that might be true, the ecosystem is moving to windows-sys anyway so I still think joining that movement makes sense for this crate. |
👍 I just wanted to make sure we represent the state of winapi-rs accurately. I agree switching to window-sys is the right call. |
It seems https://github.com/retep998/winapi-rs is now unmaintained due to https://github.com/microsoft/windows-rs (though the latter has some bananas build system)
(If we do this migration, we can replace
ALLOWED_EKUS
with[ szOID_PKIX_KP_SERVER_AUTH ]
. We mustn't do that with winapi-rs, as this (and every othersz*
constant string is dangerously wrong!)The text was updated successfully, but these errors were encountered: