rust-lang / backtrace-rs

Backtraces in Rust
https://docs.rs/backtrace
Other
526 stars 245 forks source link

Consider moving from winapi to windows-sys #537

Closed workingjubilee closed 1 month ago

workingjubilee commented 1 year ago

This is like https://github.com/rust-lang/backtrace-rs/issues/535 except it is asking a slightly different question but with the same goal: would migrating from winapi offer a more maintainable crate? If so, we should probably do it.

atouchet commented 1 year ago

I believe @kennykerr was doing some work on this previously: #494

kennykerr commented 1 year ago

I think it's about time if everyone is in agreement - there were some questions in #494 but the std library has since moved to windows-rs as @alexcrichton suggested thanks to @ChrisDenton and the libs have been working reliably so I would image the concerns that @thomcc had would be satisfied.

workingjubilee commented 1 year ago

I'd recommend getting that solved first, effectively deleting library/std/src/sys/windows/c.rs, and then once that's migrated this should be able to trivially follow.

Yeah I remember reviewing some of the PRs that were part of that cleanup.

I'm game to see that PR rebased and reopened, if you would like.

ChrisDenton commented 1 year ago

I just started looking at this. We currently use our own definitions and have a whole nest of macros to confirm they match the ones in the winapi crate (with exceptions for known issues). windows-bindgen (soon riddle) allows generating bindings so we can greatly simplify things here.

michaelwoerister commented 6 months ago

I'm currently looking into modifying the debuginfo search path so that PDBs next to the binary can be found. Being able to use windows-sys would greatly simplify that task, I think.

atouchet commented 1 month ago

The winapi crate was replaced in #634. Should this issue be closed now?

workingjubilee commented 1 month ago

Yes! Thanks @CraftSpider!