microsoft / microsoft/windows-drivers-rs

cargo clippy failure for crate level UMDF config

Open
#331 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.