microsoft / microsoft/windows-drivers-rs
cargo clippy failure for crate level UMDF config
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 136
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 4
Description
Seems like running cargo build --all-features does not play nicely with the UMDF config uncommented in the root cargo.toml. Somehow, the DRIVER_OBJECT is not able to be detected in root. After investigation, this type is generated in the bindings.
A clean cargo build builds perfectly fine.
error[E0432]: unresolved import `crate::DRIVER_OBJECT`
--> crates\wdk-sys\src\test_stubs.rs:18:13
|
18 | use crate::{DRIVER_OBJECT, NTSTATUS, PCUNICODE_STRING};
| ^^^^^^^^^^^^^
| |
| no `DRIVER_OBJECT` in the root
| help: a similar name exists in the module: `PDRIVER_OBJECT`
For more information about this error, try `rustc --explain E0432`.
error: could not compile `wdk-sys` (lib) due to 1 previous error
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with cargo build --all-features, then compare it with a clean cargo build. Start with the UMDF configuration in the root cargo.toml, crates/wdk-sys/src/test_stubs.rs, and the generated bindings; done means the all-features build no longer reports the missing DRIVER_OBJECT import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100