Skip to content

ci: workaround RUSTFLAGS leaking into cargo-make/cargo-wdk builds#51

Closed
wmmc88 wants to merge 1 commit intomicrosoft:mainfrom
wmmc88:workaround/cargo-make-rustflags
Closed

ci: workaround RUSTFLAGS leaking into cargo-make/cargo-wdk builds#51
wmmc88 wants to merge 1 commit intomicrosoft:mainfrom
wmmc88:workaround/cargo-make-rustflags

Conversation

@wmmc88
Copy link
Collaborator

@wmmc88 wmmc88 commented Mar 8, 2026

Workaround: RUSTFLAGS leaking into cargo-make/cargo-wdk rust-script builds

Temporary workaround for the RUSTFLAGS leak issue tracked in:

Problem

RUSTFLAGS=-D warnings in build.yaml leaks into rust-script compilation of wdk-build during cargo make and cargo wdk steps. This is because wdk-build is loaded as a path dependency (via symlink to registry cache), which bypasses cargo's --cap-lints allow.

Workaround

Unset RUSTFLAGS for cargo make, cargo wdk install, and cargo wdk build steps. The normal cargo build step retains RUSTFLAGS since it resolves wdk-build as a proper registry dependency.

When to remove

Once microsoft/windows-drivers-rs#629 is merged and a new wdk-build is published, this workaround can be removed and the samples repo can update its wdk-build dependency.

…t builds

Unset RUSTFLAGS for cargo-make and cargo-wdk steps in build.yaml to prevent
-D warnings from leaking into rust-script compilation of wdk-build.

This is a temporary workaround. The proper fix is in
microsoft/windows-drivers-rs#629 which rewrites path deps to version-only
deps in load_wdk_build_makefile() for registry consumers.

Root cause: wdk-build = { path = '.' } in rust-driver-makefile.toml makes
wdk-build a path dependency even when loaded from the registry cache via
symlink. Cargo does not apply --cap-lints allow to path deps, so RUSTFLAGS
leaks through.

Tracked in ADO Bug #5396440.
@wmmc88
Copy link
Collaborator Author

wmmc88 commented Mar 8, 2026

Closing in favor of bundling this workaround into #49.

@wmmc88 wmmc88 closed this Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant