Closed kouzhudong closed 1 year ago
Language projections like https://github.com/microsoft/CsWin32 and https://github.com/microsoft/windows-rs produce bindings based on this metadata.
add [dependencies.wdkmetadata] in Cargo.toml
cargo build:error: no matching package named wdkmetadata
found
C:\Users\Administrator>dotnet add package Microsoft.Windows.WDK.Win32Metadata --version 0.7.3-experimental “C:\Users\Administrator\”中找不到任何项目。
C:\Users\Administrator>
There is no rust code here, a tool should be used to convert the header file to rust code.
You shouldn't be using the metadata directly. Use https://github.com/microsoft/windows-rs.
like this? [dependencies.windows-sys] version = "0.48"
PS D:\git\github\WinDrv> cargo build
Compiling windows_x86_64_msvc v0.48.0
error: linking with link.exe
failed: exit code: 1120
Hi @kouzhudong, this repository hosts Windows Driver Kit (WDK) metadata. This is a work in progress and currently being incorporated into the windows-rs crate linked above. For additional information, see https://learn.microsoft.com/windows/dev-environment/rust/rust-for-windows. Thanks!
I did not find it can give an example