microsoft / windows-drivers-rs

Platform that enables Windows driver development in Rust. Developed by Surface.
Apache License 2.0
1.49k stars 65 forks source link

Minor bug in `build.rs` content provided by README #187

Closed kedom1337 closed 2 months ago

kedom1337 commented 2 months ago

The section of the README describing how to create a new windows-driver-rs project has a minor bug in step 6. It provides the following code for the build.rs file.

fn main() -> Result<(), wdk_build::ConfigError> {
   wdk_build::Config::from_env_auto()?.configure_binary_build()?;
   Ok(())
}

The issue here is the last ? after configure_binary_build. This function returns () and therefore does not implement Try which results in an error. Simply removing the last ? resolves the issue.

wmmc88 commented 2 months ago

This is not an error. the README is for top of tree, which made a breaking change to that function. There are changes on main that are not yet released to crates.io.

See this for more details.