ce7367bff2
wdk-build errored StaticCrtNotEnabled + the generated wdk-sys layout asserts overflowed (E0080) — UMDF needs the static CRT. Add the canonical windows-drivers-rs .cargo/config.toml: explicit target = x86_64-pc-windows-msvc (separates host proc-macros, which stay dynamic-CRT, from the driver) + target-feature=+crt-static scoped to that target. DLL now under the triple subdir. The WDK bindgen itself now runs (it generated out/types.rs) — this is the last build-config layer before the /INTEGRITYCHECK verdict. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
721 B
TOML
13 lines
721 B
TOML
# windows-drivers-rs requires UMDF drivers to link the STATIC CRT (wdk-build errors `StaticCrtNotEnabled`
|
|
# otherwise, and the generated wdk-sys bindings' layout asserts only hold with it).
|
|
#
|
|
# Setting an EXPLICIT build target is the trick that makes `target-feature=+crt-static` apply ONLY to the
|
|
# driver cdylib and NOT to host build-scripts/proc-macros (which must stay dynamic-CRT): with an explicit
|
|
# --target, cargo compiles host artifacts for the implicit host and the `[target.<triple>]` rustflags
|
|
# apply only to the target. The Windows host (and thus its drivers) is x64-only by design.
|
|
[build]
|
|
target = "x86_64-pc-windows-msvc"
|
|
|
|
[target.x86_64-pc-windows-msvc]
|
|
rustflags = ["-C", "target-feature=+crt-static"]
|