In WinSafe, Cargo features are used extensively to gate the DLL modules which are currently implemented. This is good because you specify only the modules you need, reducing your compiler effort. The Rust documentation doc_auto_cfg unstable feature was extemely useful, applying tags on each entity specifying the required feature for it.
Then, at some point of October 2025, doc_auto_cfg was merged into doc_cfg. And it’s now completely broken.
I filled an issue at the official repo. I’m not the only one missing that feature, but no one seems to care. This is so demotivating I stopped WinSafe development completely.
I found a workaround by pinning the compiler version using rust-toolchain.toml, along with the last version where doc_auto_cfg works, which I painfully found out:
[toolchain] channel = "nightly-2025-09-27" components = ["rust-docs"] targets = ["x86_64-pc-windows-msvc"]
With the above file, the command line to generate the docs is:
RUSTDOCFLAGS="--cfg docsrs" cargo doc --all-features
Or even better, directly specify the toolchain the command line:
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly-2025-09-27 doc --all-features
No comments:
Post a Comment