backtrace-rs icon indicating copy to clipboard operation
backtrace-rs copied to clipboard

Consider moving from winapi to windows-sys

Open workingjubilee opened this issue 1 year ago • 5 comments

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.

workingjubilee avatar Jun 29 '23 05:06 workingjubilee

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

atouchet avatar Jul 01 '23 00:07 atouchet

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.

kennykerr avatar Jul 01 '23 13:07 kennykerr

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.

workingjubilee avatar Jul 01 '23 23:07 workingjubilee

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.

ChrisDenton avatar Jul 17 '23 11:07 ChrisDenton

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.

michaelwoerister avatar Feb 15 '24 15:02 michaelwoerister

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

atouchet avatar Aug 05 '24 21:08 atouchet

Yes! Thanks @CraftSpider!

workingjubilee avatar Aug 05 '24 23:08 workingjubilee