microsoft / windows-drivers-rs Goto Github PK
View Code? Open in Web Editor NEWPlatform that enables Windows driver development in Rust. Developed by Surface.
License: Apache License 2.0
Platform that enables Windows driver development in Rust. Developed by Surface.
License: Apache License 2.0
Hi, thanks for this repo, it provide great help, I setup a kmdf driver from the example
But I need to know the status of the repo, is it fully function for WDM ? May I expect any plan about some upper level wrapping such as AVstream?
When I use this warehouse to create a static library, the compilation is successful. However, when I connect this static library to a driver (written in c/cpp/rust), a connection error occurs.
1>Ntstrsafe.lib(stubs.obj) : error LNK2005: _fltused 已经在 lib_drv_rs.lib(lib_drv_rs-7edd6e2e9cf34bd7.wdk_alloc-2f7aa50fc157ee7f.wdk_alloc.c21c9f9d55100c01-cgu.0.rcgu.o.rcgu.o) 中定义
1>lib_drv_rs.lib(lib_drv_rs-7edd6e2e9cf34bd7.wdk_alloc-2f7aa50fc157ee7f.wdk_alloc.c21c9f9d55100c01-cgu.0.rcgu.o.rcgu.o) : error LNK2019: 无法解析的外部符号 WdfFunctions_01033,函数 _ZN4core3ops8function6FnOnce9call_once17hae8e3e88db06564dE 中引用了该符号
D:\git\gitlab\code\test\rust\src\wdm_rs>cargo build
Compiling wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs)
Compiling wdk-sys v0.2.0
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
error: language item required, but not found: `eh_personality`
|
= note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
= help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`
The following warnings were emitted during compilation:
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of wdm_lib_rs v0.1.0 (D:\git\gitlab\code\test\rust\src\wdm_lib_rs), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
error: could not compile `wdm_lib_rs` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
D:\git\gitlab\code\test\rust\src\wdm_rs>
I created a demo, but when running cargo make, I encountered an error.
Below is the error message:
C:\Users\Administrator\Desktop\rust_driver>cargo make
[cargo-make] INFO - cargo make 0.37.8
C:\Users\Administrator\Desktop\rust_driver>cd "C:\Users\Administrator\Desktop\rust_driver"
C:\Users\Administrator\Desktop\rust_driver>pwsh.exe -Command "if ($env:CARGO_MAKE_CRATE_IS_WORKSPACE) { return };$cargoMakeURI = 'https://raw.githubusercontent.com/microsoft/windows-drivers-rs/main/rust-driver-makefile.toml';New-Item -ItemType Directory .cargo-make-loadscripts -Force;Invoke-RestMethod -Method GET -Uri $CargoMakeURI -OutFile $env:CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY/.cargo-make-loadscripts/rust-driver-makefile.toml"
Directory: C:\Users\Administrator\Desktop\rust_driver
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 2024/2/1 5:57 .cargo-make-loadscripts
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Project: rust_driver
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: default
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] ERROR - Error while running plugin: Source: Unknown Line: 37 - [tasks.wdk-build-init]'s script failed with exit code: 1
stdout:
stderr:
error: failed to get `wdk-build` as a dependency of package `main_f41fa1c176f19b8ce8394bac v0.1.0 (C:\Users\Administrator\AppData\Local\rust-script\projects\f41fa1c176f19b8ce8394bac)`
Caused by:
failed to load source for dependency `wdk-build`
Caused by:
Unable to update C:\Users\Administrator\Desktop\rust_driver\.cargo-make-loadscripts\crates\wdk-build
Caused by:
failed to read `C:\Users\Administrator\Desktop\rust_driver\.cargo-make-loadscripts\crates\wdk-build\Cargo.toml`
Caused by:
系统找不到指定的路径。 (os error 3)
error: Could not execute cargo
The temporary rust-script file is located at C:\Users\Administrator\Desktop\rust_driver\target/cargo-make-script/wdk-build-init/main.rs
[cargo-make] WARN - Build Failed.
I checked, and the wdk-build-0.1.0 dependency was successfully downloaded.
I also tried downloading a sample project and encountered the same error.
Main reason to use Rust instead C is its memory safety features. However it is only true if code when unsafe
keyword is not used in code.
Now example drivers in here and microsoft/Windows-rust-driver-samples uses unsafe keyword multiple times.
As far I understand best way to solve it would be that Microsoft creates crates around of all Windows APIs and those handles all unsafe logic and memory handling requirement by it.
Is that something we can expect to see?
Of course if Windows kernel is someday rewritten with Rust it would remove need for this but it will take years and don't help situation with any existing Windows installations.
microsoft/Windows-rust-driver-samples#7
I'm linking to the issue here in case it's not strictly relevant to the examples/is not checked there.
Please delete if it's the wrong place for this.
Future improvement: add support for specifying specific OS'es to sign for in inf2cat task
Originally posted by @wmmc88 in #35 (comment)
Support for building multiple targets in a single cargo make invocation should be added in the future
Originally posted by @wmmc88 in #35 (comment)
D:\code\rust\code\windows\windows-drivers-rs>cargo make
[cargo-make] INFO - cargo make 0.37.9
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: default
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Running Task: workspace
D:\code\rust\code\windows\windows-drivers-rs
[cargo-make][1] INFO - Calling cargo metadata to extract project info
[cargo-make][1] INFO - Cargo metadata done
[cargo-make][1] INFO - Project: sample-kmdf-driver
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: default
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration
Building and packaging driver: sample-kmdf-driver...
[cargo-make][1] INFO - Running Task: default
[cargo-make][1] INFO - Running Task: build
[cargo-make][1] INFO - Execute Command: "cargo" "build"
Compiling proc-macro2 v1.0.78
Compiling unicode-ident v1.0.12
Compiling windows_x86_64_msvc v0.52.0
Compiling once_cell v1.19.0
Compiling serde v1.0.196
Compiling windows_x86_64_msvc v0.48.5
Compiling glob v0.3.1
Compiling anstyle v1.0.6
Compiling utf8parse v0.2.1
Compiling anstyle-parse v0.2.3
Compiling regex-syntax v0.8.2
Compiling rustversion v1.0.14
Compiling libc v0.2.153
Compiling clang-sys v1.7.0
Compiling windows-targets v0.48.5
Compiling thiserror v1.0.56
Compiling windows-targets v0.52.0
Compiling rustix v0.38.31
Compiling prettyplease v0.2.16
Compiling windows-sys v0.52.0
Compiling quote v1.0.35
Compiling colorchoice v1.0.0
Compiling syn v2.0.48
Compiling windows-sys v0.48.0
Compiling clap_lex v0.6.0
Compiling log v0.4.20
Compiling memchr v2.7.1
Compiling either v1.9.0
Compiling serde_json v1.0.113
Compiling minimal-lexical v0.2.1
Compiling regex-automata v0.4.5
Compiling semver v1.0.21
Compiling strsim v0.10.0
Compiling camino v1.1.6
Compiling bitflags v2.4.2
Compiling heck v0.4.1
Compiling lazy_static v1.4.0
Compiling libloading v0.8.1
Compiling nom v7.1.3
Compiling anstyle-wincon v3.0.2
Compiling anstyle-query v1.0.2
Compiling errno v0.3.8
Compiling anstream v0.6.11
Compiling home v0.5.9
Compiling clap_builder v4.4.18
Compiling regex v1.10.3
Compiling ryu v1.0.16
Compiling itoa v1.0.10
Compiling winapi-x86_64-pc-windows-gnu v0.4.0
Compiling bindgen v0.69.4
Compiling wdk-build v0.2.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\wdk-build)
Compiling cexpr v0.6.0
Compiling which v4.4.2
Compiling itertools v0.12.1
Compiling windows-core v0.52.0
Compiling lazycell v1.3.0
Compiling winapi v0.3.9
Compiling shlex v1.3.0
Compiling rustc-hash v1.1.0
Compiling windows v0.52.0
Compiling tracing-core v0.1.32
Compiling regex-syntax v0.6.29
Compiling serde_derive v1.0.196
Compiling thiserror-impl v1.0.56
Compiling clap_derive v4.4.7
Compiling cfg-if v1.0.0
Compiling regex-automata v0.1.10
Compiling overload v0.1.1
Compiling anyhow v1.0.79
Compiling pin-project-lite v0.2.13
Compiling nu-ansi-term v0.46.0
Compiling tracing v0.1.40
Compiling thread_local v1.1.7
Compiling matchers v0.1.0
Compiling tracing-log v0.2.0
Compiling sharded-slab v0.1.7
Compiling smallvec v1.13.1
Compiling spin v0.5.2
Compiling clap v4.4.18
Compiling clap-cargo v0.14.0
Compiling wdk-macros v0.2.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\wdk-macros)
Compiling wdk-panic v0.2.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\wdk-panic)
Compiling tracing-subscriber v0.3.18
Compiling static_assertions v1.1.0
Compiling cargo-platform v0.1.6
Compiling cargo_metadata v0.18.1
Compiling wdk-sys v0.2.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\wdk-sys)
Compiling wdk v0.2.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\wdk)
Compiling sample-kmdf-driver v0.1.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\sample-kmdf-driver)
error: linking with `link.exe` failed: exit code: 1181
|
= note: "F:\\Program Files\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rustcrhP4HL\\symbols.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.12in6mesbq63yxcz.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.1bcai4ezk96acnpp.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.1g092cazj0l2tbf6.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.1ovjw2geomck4ev2.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.2a7j1dbqadyqa55y.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.2cpjl18eqwmjy0q6.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.2vmtyi74vrsh8hjt.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.34npz849vhb6y8ww.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.35hpswx5vtnhtgn9.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.3nyksowwlfv7qbu3.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.4lm7do0pyvagyzda.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.50jv6nj53aaa0vxz.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.5glnlpoq74igca8x.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.k04mv5khld9jqe6.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.128onjsky060edhz.rcgu.o" "/LIBPATH:D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps" "/LIBPATH:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwdk_build-dc3e45f54fe77532.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_cargo-332828781ca869ad.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap-214549d2cfacc5bb.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_builder-e28974a26dfb3d45.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libstrsim-573dc977c62aff4f.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstream-758010cc7366f133.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_query-667c5f114600dd0b.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_wincon-342ef912d27feae2.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcolorchoice-cc5875adf820ce29.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_parse-90563621848d7080.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libutf8parse-4fcf18673d811072.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_lex-8402c191f4871252.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle-93557ded9e952dd5.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcargo_metadata-01dcc895be052fcf.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libserde_json-ef8195e29a3b2cc0.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libitoa-df375ec0d438c612.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libryu-7b9185bc4c201990.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcargo_platform-53ef2536c7540a7e.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libsemver-46e6d142cd469446.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcamino-9dc55b7a2d1a6736.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libserde-78eb749b1081dde8.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows-f6ce87afdc4c4fa6.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_core-1bab83901ace7212.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libthiserror-420e7fdcd5060ec5.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libbindgen-a14e29591c6064b3.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libprettyplease-f55b37a08cb6cb0c.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwhich-fe5dc143d0fdb093.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libonce_cell-6f1b46958539bfd7.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libhome-e373423e5222c5a0.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_sys-943c154d607cdb93.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_targets-dbf7396e9a4fa0a4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libshlex-e2423aab758cc641.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\librustc_hash-f30f1a66e2a1f334.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex-4779464b1bd70406.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex_automata-6bcb7e53db475834.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex_syntax-21c522c0516c53ea.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblazycell-a66fb77f335564ab.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libitertools-2bf5f4250404c0ce.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libeither-b342bb9fdea76286.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcexpr-e62b3d1fb5fbd56f.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libnom-d225eaea44a18ca3.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libmemchr-2bfb3b9d8562a6b9.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclang_sys-569a7152a5bf018d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblibloading-69bc78013ada6ee4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_sys-7812720b63e74a65.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_targets-0547427c521ed3f9.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblibc-323bac63bea9946e.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libglob-923bb623568c4642.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libsyn-9eb3d73773db5f90.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblog-0c7036ee716ae85d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libquote-aabd9f63070871e4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libproc_macro2-bbe47d239998a04d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libunicode_ident-c376654f7a1ea701.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libproc_macro-23759ce1e08a2663.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblazy_static-6465f480fd39a9a6.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libbitflags-1f1fc8d13ef95de6.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-af7a289140bfd09b.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-804f96e85949d3c7.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-d732e2e30f000f5c.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-245c07b81320e419.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-071209d3d999dcc9.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-f692450d6626dc45.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-80b2971dd5ef99d4.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-9b96265a2194d52d.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-9f5f4b367cf5c108.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-1c3a36fab1085cf8.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-2cc1781d1b9a07fd.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-9e99b6830b9b39fb.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-d4d285127ad54f3d.rlib" "windows.0.52.0.lib" "windows.0.52.0.lib" "windows.0.52.0.lib" "windows.0.48.5.lib" "legacy_stdio_definitions.lib" "kernel32.lib" "advapi32.lib" "bcrypt.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "kernel32.lib" "ws2_32.lib" "kernel32.lib" "ntdll.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-acc38c9c5b6a0eb7\\build_script_build-acc38c9c5b6a0eb7.exe" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: LINK : fatal error LNK1181: cannot open input file 'windows.0.52.0.lib'
error: linking with `link.exe` failed: exit code: 1181
|
= note: "F:\\Program Files\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rustcs3YjCT\\symbols.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.1z8zsxptcdqntv3b.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.2399gz6hcpsfzpwn.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.28oe75apwxfgklin.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.2e3zp10d2bv98s5q.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.2keufvcp6dfotyii.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.2kt2nrpxboj9yl3.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.2lsdj4zfe1r0ybv8.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.2m8uizvj4g7qu5k9.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.2sjloq9g32xbf392.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.2wh50qp8tjpntt3i.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.3svxl4vvvsr73gpa.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.4auozlwkxcg8g494.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.4tfarx4u2766a3jl.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.554d6qrr89w0ezht.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.lavo1os4r324jxh.rcgu.o" "/LIBPATH:D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps" "/LIBPATH:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwdk_build-dc3e45f54fe77532.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_cargo-332828781ca869ad.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap-214549d2cfacc5bb.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_builder-e28974a26dfb3d45.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libstrsim-573dc977c62aff4f.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstream-758010cc7366f133.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_query-667c5f114600dd0b.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_wincon-342ef912d27feae2.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcolorchoice-cc5875adf820ce29.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_parse-90563621848d7080.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libutf8parse-4fcf18673d811072.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_lex-8402c191f4871252.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle-93557ded9e952dd5.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcargo_metadata-01dcc895be052fcf.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libserde_json-ef8195e29a3b2cc0.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libitoa-df375ec0d438c612.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libryu-7b9185bc4c201990.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcargo_platform-53ef2536c7540a7e.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libsemver-46e6d142cd469446.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcamino-9dc55b7a2d1a6736.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libserde-78eb749b1081dde8.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows-f6ce87afdc4c4fa6.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_core-1bab83901ace7212.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libthiserror-420e7fdcd5060ec5.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libbindgen-a14e29591c6064b3.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libprettyplease-f55b37a08cb6cb0c.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwhich-fe5dc143d0fdb093.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libonce_cell-6f1b46958539bfd7.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libhome-e373423e5222c5a0.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_sys-943c154d607cdb93.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_targets-dbf7396e9a4fa0a4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libshlex-e2423aab758cc641.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\librustc_hash-f30f1a66e2a1f334.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex-4779464b1bd70406.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex_automata-6bcb7e53db475834.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex_syntax-21c522c0516c53ea.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblazycell-a66fb77f335564ab.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libitertools-2bf5f4250404c0ce.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libeither-b342bb9fdea76286.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcexpr-e62b3d1fb5fbd56f.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libnom-d225eaea44a18ca3.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libmemchr-2bfb3b9d8562a6b9.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclang_sys-569a7152a5bf018d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblibloading-69bc78013ada6ee4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_sys-7812720b63e74a65.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_targets-0547427c521ed3f9.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblibc-323bac63bea9946e.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libglob-923bb623568c4642.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libsyn-9eb3d73773db5f90.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblog-0c7036ee716ae85d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libquote-aabd9f63070871e4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libproc_macro2-bbe47d239998a04d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libunicode_ident-c376654f7a1ea701.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libproc_macro-23759ce1e08a2663.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblazy_static-6465f480fd39a9a6.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libbitflags-1f1fc8d13ef95de6.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-af7a289140bfd09b.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-804f96e85949d3c7.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-d732e2e30f000f5c.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-245c07b81320e419.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-071209d3d999dcc9.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-f692450d6626dc45.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-80b2971dd5ef99d4.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-9b96265a2194d52d.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-9f5f4b367cf5c108.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-1c3a36fab1085cf8.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-2cc1781d1b9a07fd.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-9e99b6830b9b39fb.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-d4d285127ad54f3d.rlib" "windows.0.52.0.lib" "windows.0.52.0.lib" "windows.0.52.0.lib" "windows.0.48.5.lib" "legacy_stdio_definitions.lib" "kernel32.lib" "advapi32.lib" "bcrypt.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "kernel32.lib" "ws2_32.lib" "kernel32.lib" "ntdll.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\sample-kmdf-driver-4a2226aa9d552c12\\build_script_build-4a2226aa9d552c12.exe" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: LINK : fatal error LNK1181: cannot open input file 'windows.0.52.0.lib'
error: could not compile `sample-kmdf-driver` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `wdk` (build script) due to 1 previous error
error: linking with `link.exe` failed: exit code: 1181
|
= note: "F:\\Program Files\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\rustcSxGvds\\symbols.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.130hot9fge286ke7.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.15jar7vg8qi0baty.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.16mizqeiru1kszcw.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.173w4qzgi6au08nj.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.18p9oxueu7smtqel.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1apug43uinhncsw1.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1cd9xo65nf0rd5f3.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1fbrqz8gtizi2aea.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1ghocob9n38kscv0.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1il9rghsm7df4i6s.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1jn857ux7wjtbtxw.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1jtoz7h1t5zuyepl.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1n3rhljklslhzcst.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1nw7yfahmhsqbt6d.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1o0pfsi7lvrlirf4.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1q69hhs0cqh4ttsz.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1r22jbrsis1j8irg.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1vq4ii5ucb6ywziy.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.214eit0sggasdxcr.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.258besopmuwxxy2i.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.29yml8eky63udo4c.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2dgv1dst5jt79m1f.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2eyclpxoxbbzk6s7.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2fkibzd5jdz6asnb.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2h9impl6pvsfmzp.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2hbhha1ixai5hh91.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2ilazzei3y831dee.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2jqbkx4hzpodsrfg.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2orswk0tuhydnx86.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2qth3sf1ukl13wd4.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2qv6w6hrwxtexhge.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2s8upv7cm58yh4u3.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.2uxfs3wy5z3os4y2.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.37w0ev3ucr63ferf.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.3dvzko96nsh48r59.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.3e6twsvx387zgvau.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.3lonfjid9rnpr370.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.3lzwmm5whwbfatfh.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.3qd6ladhdtwcgji4.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.3v3f1kvy6c1s2p2t.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.41y2ttsh9v1ez8w8.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.4312y4bzf90fxni1.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.43my62z1wke1gwt5.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.469wgd8usmvpa286.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.47px894q6khq128f.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.4c3rstyy4pxbvtyl.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.4h42rtweemc8835q.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.4iemoysu3n3bk829.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.4kb732dj5ui06cbn.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.4pkz11uqq3hf1ohy.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.4q2o944o0nl8pwk1.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.50jzqcpnam02zdkg.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.51pcb6odhv67lkbb.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.51u4malrweppjbz0.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.52u1prc4gcvhgyyp.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.52v2v9kwm5pd2noi.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.542yw9ck25e7atlr.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.54j6qvspeg84tnun.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.55jt5pglpclcb9hq.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.564zamsgjcss13je.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.88d4o5uohub1b0d.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.98fra2e3une58o1.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.9c0ygx446sph299.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.fn0arukdmozr1ts.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.hcvsp9lth8kf77g.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.hj3187we6qtlu1o.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.ng759y6v7eu1qg3.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.o3x6gjt2gu78sey.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.um0rwrkap12scfh.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.upar10eb2fpp37t.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.v71s0qllxxaaejk.rcgu.o" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.1ldtj0g7kc5e9txx.rcgu.o" "/LIBPATH:D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps" "/LIBPATH:C:\\Users\\Administrator\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\winapi-x86_64-pc-windows-gnu-0.4.0\\lib" "/LIBPATH:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanyhow-8b096ade8c0b19c6.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwdk_build-dc3e45f54fe77532.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_cargo-332828781ca869ad.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap-214549d2cfacc5bb.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_builder-e28974a26dfb3d45.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libstrsim-573dc977c62aff4f.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstream-758010cc7366f133.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_query-667c5f114600dd0b.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_wincon-342ef912d27feae2.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcolorchoice-cc5875adf820ce29.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle_parse-90563621848d7080.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libutf8parse-4fcf18673d811072.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclap_lex-8402c191f4871252.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libanstyle-93557ded9e952dd5.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcargo_metadata-01dcc895be052fcf.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libserde_json-ef8195e29a3b2cc0.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libitoa-df375ec0d438c612.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libryu-7b9185bc4c201990.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcargo_platform-53ef2536c7540a7e.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libsemver-46e6d142cd469446.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcamino-9dc55b7a2d1a6736.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libserde-78eb749b1081dde8.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows-f6ce87afdc4c4fa6.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_core-1bab83901ace7212.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libthiserror-420e7fdcd5060ec5.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libtracing_subscriber-5ebf332b02b2d088.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libsmallvec-0f228cf7ed94f900.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libnu_ansi_term-4601883f7d30155a.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liboverload-bf0918a039d0b76c.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwinapi-855f1db3aab63fd4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libsharded_slab-902e1bb64f2af388.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libmatchers-aa1f835fa48eb772.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex_automata-ff95686f0d4ea977.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex_syntax-8b6d0359b0cc40af.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libtracing-966a1c20cb623069.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libpin_project_lite-d59d77ff5d4ddbe1.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libthread_local-d09faba874b0d7e4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcfg_if-165bd4e83447bb14.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libtracing_log-51710fd9471b92a4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libtracing_core-7c0d01ac24445d64.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libbindgen-a14e29591c6064b3.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libprettyplease-f55b37a08cb6cb0c.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwhich-fe5dc143d0fdb093.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libonce_cell-6f1b46958539bfd7.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libhome-e373423e5222c5a0.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_sys-943c154d607cdb93.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_targets-dbf7396e9a4fa0a4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libshlex-e2423aab758cc641.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\librustc_hash-f30f1a66e2a1f334.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex-4779464b1bd70406.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex_automata-6bcb7e53db475834.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libregex_syntax-21c522c0516c53ea.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblazycell-a66fb77f335564ab.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libitertools-2bf5f4250404c0ce.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libeither-b342bb9fdea76286.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libcexpr-e62b3d1fb5fbd56f.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libnom-d225eaea44a18ca3.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libmemchr-2bfb3b9d8562a6b9.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libclang_sys-569a7152a5bf018d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblibloading-69bc78013ada6ee4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_sys-7812720b63e74a65.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libwindows_targets-0547427c521ed3f9.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblibc-323bac63bea9946e.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libglob-923bb623568c4642.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libsyn-9eb3d73773db5f90.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblog-0c7036ee716ae85d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libquote-aabd9f63070871e4.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libproc_macro2-bbe47d239998a04d.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libunicode_ident-c376654f7a1ea701.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libproc_macro-23759ce1e08a2663.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\liblazy_static-6465f480fd39a9a6.rlib" "D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\deps\\libbitflags-1f1fc8d13ef95de6.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-af7a289140bfd09b.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-804f96e85949d3c7.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-d732e2e30f000f5c.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-245c07b81320e419.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-071209d3d999dcc9.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-f692450d6626dc45.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-80b2971dd5ef99d4.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-9b96265a2194d52d.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-9f5f4b367cf5c108.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-1c3a36fab1085cf8.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-2cc1781d1b9a07fd.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-9e99b6830b9b39fb.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-d4d285127ad54f3d.rlib" "windows.0.52.0.lib" "windows.0.52.0.lib" "winapi_gdi32.lib" "winapi_kernel32.lib" "winapi_msimg32.lib" "winapi_opengl32.lib" "winapi_winspool.lib" "windows.0.52.0.lib" "windows.0.48.5.lib" "legacy_stdio_definitions.lib" "kernel32.lib" "advapi32.lib" "bcrypt.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "kernel32.lib" "ws2_32.lib" "kernel32.lib" "ntdll.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:D:\\code\\rust\\code\\windows\\windows-drivers-rs\\target\\debug\\build\\wdk-sys-e5afa6630fb85208\\build_script_build-e5afa6630fb85208.exe" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: LINK : fatal error LNK1181: cannot open input file 'windows.0.52.0.lib'
error: could not compile `wdk-sys` (build script) due to 1 previous error
[cargo-make][1] ERROR - Error while executing command, exit code: 101
[cargo-make][1] WARN - Build Failed.
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 5 - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
D:\code\rust\code\windows\windows-drivers-rs>rustup -v
verbose: read metadata version: '12'
rustup 1.27.0 (bbb9276d2 2024-03-08)
The Rust toolchain installer
Usage: rustup [OPTIONS] [+toolchain] [COMMAND]
Commands:
show Show the active and installed toolchains or profiles
update Update Rust toolchains and rustup
check Check for updates to Rust toolchains and rustup
default Set the default toolchain
toolchain Modify or query the installed toolchains
target Modify a toolchain's supported targets
component Modify a toolchain's installed components
override Modify toolchain overrides for directories
run Run a command with an environment configured for a given toolchain
which Display which binary will be run for a given command
doc Open the documentation for the current toolchain
self Modify the rustup installation
set Alter rustup settings
completions Generate tab-completion scripts for your shell
help Print this message or the help of the given subcommand(s)
Arguments:
[+toolchain]
release channel (e.g. +stable) or custom toolchain to set override
Options:
-v, --verbose
Enable verbose output
-q, --quiet
Disable progress output
-h, --help
Print help
-V, --version
Print version
Discussion:
Rustup installs The Rust Programming Language from the official
release channels, enabling you to easily switch between stable,
beta, and nightly compilers and keep them updated. It makes
cross-compiling simpler with binary builds of the standard library
for common platforms.
If you are new to Rust consider running `rustup doc --book` to
learn Rust.
D:\code\rust\code\windows\windows-drivers-rs>
Error: failed to run custom build command for wdk-sys v0.2.0
Caused by:
process didn't exit successfully: D:\Myself\RustProjects\wdk-rs\target\debug\build\wdk-sys-d4ff924bcbc978d5\build-script-build
(exit code: 1)
--- stderr
Error: 系统找不到指定的路径。 (os error 3)
ERROR - Error while running plugin: Source: Unknown Line: 38 - [tasks.wdk-build-init]'s script failed with exit code: 1
Caused by:
failed to load source for dependency wdk-build
I got same error in the closed issues.however, there is not information about how to fix this error
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.7.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Program Files\Microsoft Visual Studio\2022\Enterprise>cd /d D:\code\rust\code\windows\windows-drivers-rs
D:\code\rust\code\windows\windows-drivers-rs>cargo build
Compiling wdk-sys v0.1.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\wdk-sys)
error: failed to run custom build command for `wdk-sys v0.1.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\wdk-sys)`
Caused by:
process didn't exit successfully: `D:\code\rust\code\windows\windows-drivers-rs\target\debug\build\wdk-sys-bd0a85a523038361\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'WDKContentRoot should be able to be detected. Ensure that the WDK is installed, or that the environment setup scripts in the eWDK have been run.', crates\wdk-build\src\lib.rs:111:64
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
D:\code\rust\code\windows\windows-drivers-rs>
Certain warnings from bindgen are not actionable by WDR due to upstream work required. These warnings should be individually silenced instead of turning off all warnings for the bindgen module. This is currently not possible because tracing's envfilter does not have functional field value matching for logs, only for spans. See tokio-rs/tracing#2843. Since bindgen is using log
s instead of trace
s, this probably involves fixing something in tracing-log
windows-drivers-rs/crates/wdk-alloc/src/lib.rs
Lines 25 to 33 in 79d09bb
Is there a reason this uses lazy_static instead of just a const and a byte string literal (of type &[u8;4]
)? u32::from_ne_bytes
is const stable since 1.44.
Support for other types of drivers (ex. non-PNP) should be added in the future
Originally posted by @wmmc88 in #35 (comment)
If possible, please make a binding with this library, thanks :https://github.com/tinygo-org/tinygo
Compiling sample-kmdf-driver v0.1.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\sample-kmdf-driver)
error: failed to run custom build command for `wdk-sys v0.1.0 (D:\code\rust\code\windows\windows-drivers-rs\crates\wdk-sys)`
Caused by:
process didn't exit successfully: `D:\code\rust\code\windows\windows-drivers-rs\target\debug\build\wdk-sys-f908dc45cde94a15\build-script-build` (exit code: 1)
--- stderr
Error: cannot find directory: C:\Program Files (x86)\Windows Kits\10\Include\wdf/kmdf/1.33
warning: build failed, waiting for other jobs to finish...
D:\code\rust\code\windows\windows-drivers-rs>cargo make
[cargo-make] INFO - cargo make 0.37.9
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: default
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] ERROR - Error while running plugin: Source: Unknown Line: 37 - [tasks.wdk-build-init]'s script failed with exit code: 1
stdout:
FORWARDING ARGS TO CARGO-MAKE:
CARGO_MAKE_CARGO_PROFILE=dev
WDK_BUILD_OUTPUT_DIRECTORY=D:\code\rust\code\windows\windows-drivers-rs\target/debug
stderr:
Error: IoError(Os { code: 2, kind: NotFound, message: "系统找不到指定的文件。" })
The temporary rust-script file is located at D:\code\rust\code\windows\windows-drivers-rs\target/cargo-make-script/wdk-build-init/main.rs
[cargo-make] WARN - Build Failed.
D:\code\rust\code\windows\windows-drivers-rs>
Currently, the crate that's distributed via crates.io has several things hardcoded in the configuration. Some examples of this include the WdfFunctions_01033 functional table reference, and the WdfMinimumVersionDesired symbol. The wdk-build::Config
used in wdk-sys
also defaults to KMDF 1.33.
While the repo supports different WDF versions, different driver models (WDM, KMDF, UMDF), etc, it is currently cumbersome to use anything that is not KMDF v1.33. Our goal should be to expose allow the user to be able to use the crate off crates.io and be able to configure all of the common configuration options of the WDK.
A possible way to do this would be to have mutually-exclusive cargo-features for wdk-sys
and wdk
that configure what bindings are created by the crate.
There are some caveats for using mutually exclusive features, but it might be the best way forward that's currently available. There is extensive discussion about better ways to accomplish this in the future here and here, but we must make do with what is available right now.
Another possible approach is to use environment variables to control the various features. Env variables can only have one value at any given time, so they are already mutually exclusive. They could be set via normal environment variable in shell, via env
section in a config.toml
, or in any of the numerous ways cargo-make provides. This does harm discoverability of options, and there are some issues with some ways to configure env variables in Cargo right now (ex. rust-lang/cargo#10358. This one in particular seems like it will not be resolved for a while).
Some other thoughts:
First, I'm very pleased to see this effort being open sourced. Big kudos to you all at Microsoft for formalizing a repository on this subject ❤️.
This is not an issue against the repository, rather, I hope to open a discussion on the topic of structured exception handling. For the Windows Kernel (and the OS in general) structured exception handling is an integral part of developing for Windows and a real blockers to making Rust a reality for Windows Kernel development.
Structured exception handling is a requirement in a number of workflows in the Windows Kernel. There are cases where structured exception handling is unavoidable, e.g. cases where an exported Kernel API expects the caller to handle a structured exception. Here are some examples where structured exceptions are used:
__try
/__except
block.Development in the Windows Kernel requires allocations from different pools and the capability to tag allocations is an invaluable tool for debugging/triage.
Today this repository looks to recommend a global allocator and one that allocates exclusively from non-paged pool with a hard-coded pool tag.
windows-drivers-rs/crates/wdk-alloc/src/lib.rs
Lines 35 to 45 in cd1fd23
Rust crates for the Windows Kernel probably shouldn't provide a global kernel allocator. Else everyone using these crates may subtly end up allocating memory using identical tags. This will make debugging and triage a nightmare in the long term. Additionally I'll note, the non-paged pools are far more limited resource that the paged pools. I recognize that the safer option when implementing a global allocator is to force it into non-paged memory, since not doing so has the potential to introduce other issues. However resource exhaustion is far more likely when forcing all allocations into non-paged pools.
For Rust to be a first-class citizen in the Windows Kernel. The language must support generic fail-able allocators. And the crates for the Windows Kernel should expose and support appropriate allocators that are capable of specifying pool types and tags.
I am attempting to work off git main
with a fresh project. I have followed the steps outlined in the readme and I am receiving an error:
|
7 | wdk_build::cargo_make::load_rust_driver_makefile()?
| ^ expected one of `!` or `::`
I have since updated my Cargo.toml:
[dependencies]
wdk = { git = "https://github.com/microsoft/windows-drivers-rs", branch = "main" }
wdk-alloc = { git = "https://github.com/microsoft/windows-drivers-rs", branch = "main" }
wdk-panic = { git = "https://github.com/microsoft/windows-drivers-rs", branch = "main" }
wdk-sys = { git = "https://github.com/microsoft/windows-drivers-rs", branch = "main" }
[build-dependencies]
wdk-build = { git = "https://github.com/microsoft/windows-drivers-rs", branch = "main" }
And Makefile.toml:
extend = "target/rust-driver-makefile.toml"
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
[config]
load_script = '''
#!@rust
//! ```cargo
//! [dependencies]
//! wdk-build = { git = "https://github.com/microsoft/windows-drivers-rs", branch = "main" } # "0.1.0" gives same output
//! ```
#![allow(unused_doc_comments)]
wdk_build::cargo_make::load_rust_driver_makefile()?
'''
With https://github.com/sagiegurari/cargo-make/issues/1025 being resolved in cargo make v0.37.8, these condition scripts could be refactored to be rust-based for better maintainability, but since its fully functional right now, I'll leave that as a future improvement.
Originally posted by @wmmc88 in #35 (comment)
Also see #35 (comment)
Future improvement: add support for customizing the name of the Cert Store in `generate-certificate` and `signtool` task
Originally posted by @wmmc88 in #35 (comment)
Define the CTL_CODE
macro and the IoGetCurrentIrpStackLocation
function.
Move constants and macros (such as FILE_DEVICE_UNKNOWN
, METHOD_BUFFERED
, and others) from this crate and windows-rs to a shared crate.
Motivation: This enables the definition of IOCTL codes in a shared crate that can be linked to both the driver and application sides.
Change the types of some constants, like IRP_MJ_*
to usize
, and IO_NO_INCREMENT
to CCHAR
. It would also be beneficial to define TRUE
and FALSE
as pub const TRUE: BOOLEAN = 1;
and pub const FALSE: BOOLEAN = 0;
respectively, or even better, eliminate all BOOLEAN
types from the API and replace them with the plain Rust bool, although I understand that this might be nearly impossible.
Motivation: To eliminate unnecessary type casting where it logically should not exist.
Do something with __bindgen_anon_*
.
Motivation: The statement (*irp).IoStatus.__bindgen_anon_1.Status = status;
looks very awkward, and it's also challenging to locate the needed field in more complex cases like (*irp).Tail.Overlay.__bindgen_anon_2.__bindgen_anon_1.CurrentStackLocation
.
In general, it would be beneficial if constants in constants.rs
had types from types.rs
.
"Panic" in the Windows Kernel (or "bugchecking" the system KeBugCheckEx) is a last resort and should be reserved only for cases where the kernel is in a corrupted and unrecoverable state. It is usually never acceptable to bugcheck the system. I find it unlikely that any Rust crate would ever need to bugcheck the kernel.
Today this library notes a "TODO" on this topic:
windows-drivers-rs/crates/wdk-panic/src/lib.rs
Lines 29 to 33 in cd1fd23
Ultimately the kernel should handle errors cleanly and, by all means necessary, prevent itself from getting into a corrupted or unrecoverable state. I worry that the introduction of a panic handler and the interactions between other crates written for the Windows Kernel could degrade the overall reliability of the kernel.
I'm not certain the best way to approach this problem. My initial reaction is disallow panic handlers when developing against the Windows Kernel and reserve "panics" (bugchecks) for the rare and extreme cases. To achieve this the crates used in the kernel would need to always communicate errors rather than giving up with a panic. Thankfully, Rust has robust and capable error handling patterns with things like match
and Result
. I'd like to raise this as an open topic to the community to discuss strategies for panic handling for the Windows Kernel.
Hello friend,
I've noticed that a lot of people, especially in various Discord communities, are discussing an issue with the Windows 10 driver not working correctly for wdk-sys
. Here's a step-by-step outline of the problem:
Steps to Reproduce:
sc.exe create test type= kernel binPath= C:\Windows\System32\drivers\test.sys
sc.exe query test
sc.exe start test
Observed Issue:
On executing the above steps, the following error messages are observed:
[SC] CreateService FAILED 1073:
The specified service already exists.
SERVICE_NAME: test
TYPE : 1 KERNEL_DRIVER
STATE : 1 STOPPED
WIN32_EXIT_CODE : 87 (0x57)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
[SC] StartService FAILED 87:
The parameter is incorrect.
Additional Notes:
I'd appreciate any insights or solutions to resolve this issue on Windows 10.
Thank you!
error[E0554]: `#![feature]` may not be used on the stable release channel
--> crates\wdk-macros\src\lib.rs:6:42
|
6 | #![cfg_attr(feature = "nightly", feature(hint_must_use))]
| ^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0554`.
error: could not compile `wdk-macros` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
[cargo-make][1] ERROR - Error while executing command, exit code: 101
[cargo-make][1] WARN - Build Failed.
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 8 - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
I had trouble compiling my own test driver, so I wanted to compile the sample-kmdf-driver crate to see if the problem is with my driver.
But I get the same error from that project (full output below):
Bindings should succeed to generate: ClangDiagnostic("E:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/ntifs.h:25:2: error: Compiler version not supported by Windows DDK...
I'm running Windows 10 LTSC, with the latest (10.0.22621) EWDK iso mounted to E:
It looks like the compiler doesn't set preprocessor defines such as _MSC_VER for some reason
C:\dev\rust-kernel\windows-drivers-rs\crates\sample-kmdf-driver>cargo make
[cargo-make] INFO - cargo make 0.37.9
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Project: sample-kmdf-driver
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: default
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
Building and packaging driver: sample-kmdf-driver...
[cargo-make] INFO - Running Task: default
[cargo-make] INFO - Running Task: build
[cargo-make] INFO - Execute Command: "cargo" "build"
Compiling wdk-sys v0.2.0 (C:\dev\rust-kernel\windows-drivers-rs\crates\wdk-sys)
error: failed to run custom build command for `wdk-sys v0.2.0 (C:\dev\rust-kernel\windows-drivers-rs\crates\wdk-sys)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `C:\dev\rust-kernel\windows-drivers-rs\target\debug\build\wdk-sys-83dd066b1c411ae7\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=TARGET
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS
cargo:rerun-if-changed=src/ntddk-input.h
cargo:rerun-if-changed=src/wdf-input.h
--- stderr
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/ntifs.h:25:2: error: Compiler version not supported by Windows DDK
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/ntddk.h:28:2: error: Compiler version not supported by Windows DDK
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:38:2: error: Compiler version not supported by Windows DDK
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\shared/basetsd.h:318:33: warning: cast to smaller integer type 'unsigned long' from 'const void *' [-Wvoid-pointer-to-int-cast]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\shared/basetsd.h:327:32: warning: cast to smaller integer type 'long' from 'const void *' [-Wvoid-pointer-to-int-cast]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\shared/basetsd.h:336:12: warning: cast to 'void *' from smaller integer type 'unsigned long' [-Wint-to-void-pointer-cast]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\shared/ntdef.h:1390:2: error: Must define a target architecture.
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4864:19: error: call to undeclared function 'ReadAcquire8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4875:19: error: call to undeclared function 'ReadNoFence8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4886:21: error: call to undeclared function 'ReadAcquire8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4897:21: error: call to undeclared function 'ReadNoFence8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4930:5: error: call to undeclared function 'WriteRelease8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4943:5: error: call to undeclared function 'WriteNoFence8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4956:5: error: call to undeclared function 'WriteRelease8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4969:5: error: call to undeclared function 'WriteNoFence8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:4994:20: error: call to undeclared function 'ReadAcquire16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:5005:20: error: call to undeclared function 'ReadNoFence16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:5028:5: error: call to undeclared function 'WriteRelease16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:5041:5: error: call to undeclared function 'WriteNoFence16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:5066:19: error: call to undeclared function 'ReadAcquire'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:5077:19: error: call to undeclared function 'ReadNoFence'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
E:\Program Files\Windows Kits\10\Include\10.0.22621.0\km/wdm.h:5100:5: error: call to undeclared function 'WriteRelease'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
clang diag: E:\Program Files\Windows Kits\10\Include\10.0.22621.0\shared/basetsd.h:318:33: warning: cast to smaller integer type 'unsigned long' from 'const void *' [-Wvoid-pointer-to-int-cast]
clang diag: E:\Program Files\Windows Kits\10\Include\10.0.22621.0\shared/basetsd.h:327:32: warning: cast to smaller integer type 'long' from 'const void *' [-Wvoid-pointer-to-int-cast]
clang diag: E:\Program Files\Windows Kits\10\Include\10.0.22621.0\shared/basetsd.h:336:12: warning: cast to 'void *' from smaller integer type 'unsigned long' [-Wint-to-void-pointer-cast]
thread 'main' panicked at crates\wdk-sys\build.rs:27:14:
Bindings should succeed to generate: ClangDiagnostic("E:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/ntifs.h:25:2: error: Compiler version not supported by Windows DDK\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/ntddk.h:28:2: error: Compiler version not supported by Windows DDK\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:38:2: error: Compiler version not supported by Windows DDK\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\shared/ntdef.h:1390:2: error: Must define a target architecture.\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4864:19: error: call to undeclared function 'ReadAcquire8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4875:19: error: call to undeclared function 'ReadNoFence8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4886:21: error: call to undeclared function 'ReadAcquire8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4897:21: error: call to undeclared function 'ReadNoFence8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4930:5: error: call to undeclared function 'WriteRelease8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4943:5: error: call to undeclared function 'WriteNoFence8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4956:5: error: call to undeclared function 'WriteRelease8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4969:5: error: call to undeclared function 'WriteNoFence8'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:4994:20: error: call to undeclared function 'ReadAcquire16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:5005:20: error: call to undeclared function 'ReadNoFence16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:5028:5: error: call to undeclared function 'WriteRelease16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:5041:5: error: call to undeclared function 'WriteNoFence16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:5066:19: error: call to undeclared function 'ReadAcquire'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:5077:19: error: call to undeclared function 'ReadNoFence'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nE:\\Program Files\\Windows Kits\\10\\Include\\10.0.22621.0\\km/wdm.h:5100:5: error: call to undeclared function 'WriteRelease'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]\nfatal error: too many errors emitted, stopping now [-ferror-limit=]\n")
stack backtrace:
0: 0x7ff68772b1b3 - std::sys_common::backtrace::_print::impl$0::fmt
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\sys_common\backtrace.rs:44
1: 0x7ff68774c49d - core::fmt::rt::Argument::fmt
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\core\src\fmt\rt.rs:142
2: 0x7ff68774c49d - core::fmt::write
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\core\src\fmt\mod.rs:1120
3: 0x7ff6877268a1 - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\io\mod.rs:1762
4: 0x7ff68772afba - std::sys_common::backtrace::_print
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\sys_common\backtrace.rs:47
5: 0x7ff68772afba - std::sys_common::backtrace::print
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\sys_common\backtrace.rs:34
6: 0x7ff68772d509 - std::panicking::default_hook::closure$1
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\panicking.rs:272
7: 0x7ff68772d1cb - std::panicking::default_hook
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\panicking.rs:292
8: 0x7ff68772d9f4 - std::panicking::rust_panic_with_hook
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\panicking.rs:779
9: 0x7ff68772d8c5 - std::panicking::begin_panic_handler::closure$0
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\panicking.rs:657
10: 0x7ff68772baa9 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\sys_common\backtrace.rs:170
11: 0x7ff68772d5d4 - std::panicking::begin_panic_handler
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\panicking.rs:645
12: 0x7ff687755147 - core::panicking::panic_fmt
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\core\src\panicking.rs:72
13: 0x7ff687755703 - core::result::unwrap_failed
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\core\src\result.rs:1653
14: 0x7ff6870b78b2 - core::result::Result<T,E>::expect::h0d737977ad35a758
15: 0x7ff6870b7e1c - <tracing_core::span::Id as core::clone::Clone>::clone::h6924d960d20cc670
16: 0x7ff6870b9651 - <tracing_core::span::Id as core::clone::Clone>::clone::h6924d960d20cc670
17: 0x7ff6870b25a6 - core::ops::function::FnOnce::call_once::h2363bccbde1a8686
18: 0x7ff6870b5259 - std::sys_common::backtrace::__rust_begin_short_backtrace::h01d5257eb604a13c
19: 0x7ff6870b330c - std::rt::lang_start::{{closure}}::h0741405682e202fc
20: 0x7ff6877216a8 - std::rt::lang_start_internal::closure$2
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\rt.rs:148
21: 0x7ff6877216a8 - std::panicking::try::do_call
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\panicking.rs:552
22: 0x7ff6877216a8 - std::panicking::try
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\panicking.rs:516
23: 0x7ff6877216a8 - std::panic::catch_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\panic.rs:142
24: 0x7ff6877216a8 - std::rt::lang_start_internal
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library\std\src\rt.rs:148
25: 0x7ff6870b32e7 - std::rt::lang_start::hdc2616c860b3953a
26: 0x7ff6870ba069 - main
27: 0x7ff687752a60 - invoke_main
at d:\a01\_work\43\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
28: 0x7ff687752a60 - __scrt_common_main_seh
at d:\a01\_work\43\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
29: 0x7ffde0ab7344 - BaseThreadInitThunk
30: 0x7ffde28226b1 - RtlUserThreadStart
[cargo-make] ERROR - Error while executing command, exit code: 101
[cargo-make] WARN - Build Failed.
Support for ARM64 tests is possibly possible in the future via target-specific test runner: https://doc.rust-lang.org/cargo/reference/config.html#target
Originally posted by @wmmc88 in #35 (comment)
Would it be possible to add a macro that handles allocator setup, panic handler, and DriverEntry
? These are sort of boilerplate things that everyone has to do, so I wonder if this could be simplified for the common use case.
The way the RFL project does this is by having a trait Module
that can be implemented for any struct, and then registered with module!
which sets up the statics. Maybe something like this could work? Example: https://github.com/torvalds/linux/blob/6bc986ab839c844e78a2333a02e55f02c9e57935/samples/rust/rust_print.rs#L8
I would like to create a UMDF2 driver. I have cloned this repo but I am not able to modify the build.rs of wdk-sys crate to compile this umdf driver. Could you help me with how to do it? Thanks!!!
Error: link using link.exe
failed: exit code: 1120
|
= note: "C:\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\Tools\\MSVC\\14.36.32532\\bin\HostX64\x64\link. exe" "/DEF:C:\Users\\kelac\AppData\Local\\Temp\rustciNoZXt\lib. def" "/NOLOGO" "C:\Users\kelac\\AppData\Local\Temp\rustciNoZXt\symbols. o" "C:\Users\kelac\OneDrive\Desktop\joe\driver\target\debug\deps\driver.wdk_alloc-fab5448edb774dc7.wdk_alloc.d3d3930f6a8c5a64-cgu.0 .rcgu.o.rcgu.o" "/LIBPATH:C:\Users\kelac\OneDrive\Desktop\joe\\driver\\target\\debug\deps" "/LIBPATH:D:\Program Files\Windows Kits\\10\Lib\10.0.22621. 0\km\x64" "/LIBPATH:D:\Program Files\\Windows Kits\\10\Lib\\wdf\kmdf\x64\1.33" "/LIBPATH:C:\Users\kelac. rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "C:\Users\kelac\. rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcompiler_builtins-ea81af1caf017ce1. rlib" "BufferOverflowFastFailK.lib" "ntoskrnl.lib" "hal.lib" "wmilib.lib" "WdfLdr.lib" "WdfDriverEntry.lib" "/NXCOMPATH" "/LIBPATH:C:\Users\\kelac\. rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "/OUT:C:\Users\kelac\OneDrive\Desktop\joe\driver\target\debug\deps\driver. dll" "/OPT:REF,NOICF" "/DLL" "/IMPLIB:C:\Users\kelac\OneDrive\Desktop\joe\driver\\target\debug\deps\driver.dll. lib" "/DEBUG" "/NATVIS:C:\Users\\kelac\. rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\etc\intrinsic. natvis" "/NATVIS:C:\Users\\kelac\. rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\\etc\liballoc.natvis" "/NATVIS:C:\Users\kelac. rustup\\toolchains\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\libcore.natvis" "/NATVIS:C:\Users\\kelac.rustup\toolchains\nightly-x86_64-pc-windows-msvc\\lib\rustlib\etc\libstd.natvis"
= Note: This creates the library C:\Users\kelac\OneDrive\Desktop\joe\driver\target\debug\deps\driver.dll.lib and the object C:\Users\kelac\OneDrive\Desktop\joe\driver\target\debug\deps\driver.dll.exp.
LINK : error LNK2001: Unrecognized external symbol _DllMainCRTStartup
C:\Users\kelac\OneDrive\Desktop\joe\driver\target\debug\deps\driver.dll : fatal error LNK1120: Number of unrecognized external types: 1
Hi! Thanks for your awesome work, but I have a question: windows-rs has bindings for WDK based on wdkmetadata, your crate uses bindgen. So... which crate should I use for a long-term project? Which crate is "official" WDK port that Microsoft recommends to use for drivers? And which approach is better (wdkmetadata vs bindgen) in terms of accuracy and completeness?
This version, along with the versions in the cargo-make makefiles(including the other pinned binary dependencies) should be auto-updated by pipelines (similar to other things managed by dependabot). It looks like this is [not supported by dependabot yet](https://github.com/dependabot/dependabot-core/issues/9420), but there's another popular open source tool called [renovatebot that supports this](https://docs.renovatebot.com/modules/manager/regex/).
Originally posted by @wmmc88 in #127 (comment)
All dependencies should have update prs generated automatically. this included pinned binary dependencies in github actions, dependencies specified in cargo-make makefiles, etc
Hello,
I would like to submit this proposal for enhancing the Rust binding generation process for Windows headers. Currently, the process involves using bindgen multiple times to create separate Rust modules from different header files. This method leads to significant code duplication, as many headers share common functions and structures.
Proposal:
My proposal is to optimize this process by using bindgen once with a complete list of Windows headers, and then segmenting the generated binding file into multiple Rust sub-modules. This approach aims to reduce code duplication and improve the overall efficiency of the process.
To facilitate this segmentation, I suggest developing a function that analyzes the generated binding file, constructs a hashmap linking each element (function, variable, etc.) to its original header, and uses this information to appropriately divide the file into sub-modules. Additionally, this function could identify elements that bindgen was unable to convert, thus maintaining a tracking file for developers, indicating areas that require manual attention or implementation.
Personal Context:
I would like to note that I am a beginner in Rust and system programming. Therefore, it's possible that my proposal might not fully align with the best practices or current standards of the project. If that's the case, I apologize in advance for any inconvenience caused and would be grateful for any advice or suggestions to improve my proposal.
Thank you for your consideration and time.
Best regards
I'm trying to use the repo to write a keyboard driver - https://github.com/lurebat/interustception
My problem is as such:
When using WDF_IO_QUEUE_CONFIG
, everything is fine as long as I use EvtIoDeviceControl
.
But as soon as I try to set EvtIoInternalDeviceControl
, installing hangs forever. The setup file in C:\windows\inf writes binary gibberish.
The callback function has the correct signature, and marked with
#[no_mangle]
#[link_section = "PAGE"]
pub unsafe extern "C"
I can gurantee the object is initialized correctly (as I have debug prints).
The device_create functions returns with a successful code, it hangs later on when trying to start the device.
I even tried marking all of my user-made functions with link_section=PAGE, and I suspect it might be something in this area, or something deallocates before it needs to - but I can't figure it out.
The callback isn't even called as far as I can tell - breakpoints don't set, prints don't print, etc.
I haven't found anything online on a similar problem, and at this point I'm desperate - so maybe it's the framework or rust.
Even ideas to how to debug it would be great help.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.