Is it possible to use the windows(-sys) crate to provide Windows APIs in libstd?

Currently std uses manually coded Windows API bindings, while today we have windows(-sys) crate with bindings generated from metadata, which is technically better. Is it possible to make std depend on windows(-sys) crate when cfg(windows) and then use it to provide Windows API bindings?

1 Like

This must be possible, since std already depends on libc crate for POSIX APIs.

This is actually the case now, it was updated pretty recently: Start using `windows sys` for Windows FFI bindings in std by ChrisDenton · Pull Request #110152 · rust-lang/rust · GitHub

8 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.