From 161562682ea7c845a06b35ad6851946d1a0395ff Mon Sep 17 00:00:00 2001 From: Melvin Wang Date: Mon, 4 Aug 2025 16:25:07 -0700 Subject: [PATCH 1/3] fix: update crate references for consistency in documentation --- crates/cargo-wdk/src/main.rs | 4 ++-- crates/wdk-build/src/lib.rs | 4 ++-- crates/wdk-macros/src/lib.rs | 8 ++++---- crates/wdk/src/lib.rs | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/cargo-wdk/src/main.rs b/crates/cargo-wdk/src/main.rs index bdaf0704f..b1d85ba2c 100644 --- a/crates/cargo-wdk/src/main.rs +++ b/crates/cargo-wdk/src/main.rs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 -//! [`cargo-wdk`] is a Cargo extension that can be used to create build and +//! The [`cargo-wdk`][crate] crate is a Cargo extension that can be used to create build and //! package Windows driver projects. #![allow(clippy::multiple_crate_versions)] @@ -16,7 +16,7 @@ use clap::Parser; use cli::Cli; use tracing::error; -/// Main function for the cargo-wdk CLI application. +/// Main function for the [`cargo-wdk`][crate] CLI application. /// /// The main function parses the CLI input, sets up tracing and executes the /// command. If an error occurs during execution, it logs the error and exits diff --git a/crates/wdk-build/src/lib.rs b/crates/wdk-build/src/lib.rs index 16f10ffc1..535aea4b5 100644 --- a/crates/wdk-build/src/lib.rs +++ b/crates/wdk-build/src/lib.rs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 -//! [`wdk-build`] is a library that is used within Cargo build scripts to +//! The [`wdk-build`][crate] crate is a library that is used within Cargo build scripts to //! configure any build that depends on the WDK (Windows Driver Kit). This is //! especially useful for crates that generate FFI bindings to the WDK, //! WDK-dependent libraries, and programs built on top of the WDK (ex. Drivers). @@ -139,7 +139,7 @@ pub struct UmdfConfig { pub minimum_umdf_version_minor: Option, } -/// Errors that could result from configuring a build via [`wdk-build`] +/// Errors that could result from configuring a build via [`wdk_build`][crate] #[derive(Debug, Error)] pub enum ConfigError { /// Error returned when an [`std::io`] operation fails diff --git a/crates/wdk-macros/src/lib.rs b/crates/wdk-macros/src/lib.rs index f3a86e385..f19b59955 100644 --- a/crates/wdk-macros/src/lib.rs +++ b/crates/wdk-macros/src/lib.rs @@ -2,7 +2,7 @@ // License: MIT OR Apache-2.0 //! A collection of macros that help make it easier to interact with -//! [`wdk-sys`]'s direct bindings to the Windows Driver Kit (WDK). +//! [`wdk_sys`](../wdk_sys/index.html)'s direct bindings to the Windows Driver Kit (WDK). use std::{collections::BTreeMap, path::PathBuf, str::FromStr}; @@ -49,9 +49,9 @@ const WDF_FUNC_ENUM_MOD_NAME: &str = "_WDFFUNCENUM"; /// A procedural macro that allows WDF functions to be called by name. /// -/// This macro is only intended to be used in the `wdk-sys` crate. Users wanting -/// to call WDF functions should use the macro in `wdk-sys`. This macro differs -/// from the one in [`wdk-sys`] in that it must pass in the generated types from +/// This macro is only intended to be used in the [`wdk_sys`](../wdk_sys/index.html) crate. Users wanting +/// to call WDF functions should use the macro in [`wdk_sys`](../wdk_sys/index.html). This macro differs +/// from the one in [`wdk_sys`](../wdk_sys/index.html) in that it must pass in the generated types from /// `wdk-sys` as an argument to the macro. #[proc_macro] pub fn call_unsafe_wdf_function_binding(input_tokens: TokenStream) -> TokenStream { diff --git a/crates/wdk/src/lib.rs b/crates/wdk/src/lib.rs index 665cd6999..652968996 100644 --- a/crates/wdk/src/lib.rs +++ b/crates/wdk/src/lib.rs @@ -2,7 +2,7 @@ // License: MIT OR Apache-2.0 //! Idiomatic Rust wrappers for the Windows Driver Kit (WDK) APIs. This crate is -//! built on top of the raw FFI bindings provided by [`wdk-sys`], and provides a +//! built on top of the raw FFI bindings provided by [`wdk_sys`], and provides a //! safe, idiomatic rust interface to the WDK. #![cfg_attr( From 63ddf39eaf389a102f8aef0ec46d49ec0a3eb5b8 Mon Sep 17 00:00:00 2001 From: Melvin Wang Date: Mon, 4 Aug 2025 16:35:24 -0700 Subject: [PATCH 2/3] fix fmt --- crates/cargo-wdk/src/main.rs | 4 ++-- crates/wdk-build/src/lib.rs | 6 +++--- crates/wdk-macros/src/lib.rs | 12 +++++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/crates/cargo-wdk/src/main.rs b/crates/cargo-wdk/src/main.rs index b1d85ba2c..daaf55e02 100644 --- a/crates/cargo-wdk/src/main.rs +++ b/crates/cargo-wdk/src/main.rs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 -//! The [`cargo-wdk`][crate] crate is a Cargo extension that can be used to create build and -//! package Windows driver projects. +//! The [`cargo-wdk`][crate] crate is a Cargo extension that can be used to +//! create build and package Windows driver projects. #![allow(clippy::multiple_crate_versions)] /// The `regex-syntax` and `regex-automata` crates have multiple version diff --git a/crates/wdk-build/src/lib.rs b/crates/wdk-build/src/lib.rs index 535aea4b5..2b1787faf 100644 --- a/crates/wdk-build/src/lib.rs +++ b/crates/wdk-build/src/lib.rs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation // License: MIT OR Apache-2.0 -//! The [`wdk-build`][crate] crate is a library that is used within Cargo build scripts to -//! configure any build that depends on the WDK (Windows Driver Kit). This is -//! especially useful for crates that generate FFI bindings to the WDK, +//! The [`wdk-build`][crate] crate is a library that is used within Cargo build +//! scripts to configure any build that depends on the WDK (Windows Driver Kit). +//! This is especially useful for crates that generate FFI bindings to the WDK, //! WDK-dependent libraries, and programs built on top of the WDK (ex. Drivers). //! This library is built to be able to accommodate different WDK releases, as //! well strives to allow for all the configuration the WDK allows. This diff --git a/crates/wdk-macros/src/lib.rs b/crates/wdk-macros/src/lib.rs index f19b59955..97bd1abb5 100644 --- a/crates/wdk-macros/src/lib.rs +++ b/crates/wdk-macros/src/lib.rs @@ -2,7 +2,8 @@ // License: MIT OR Apache-2.0 //! A collection of macros that help make it easier to interact with -//! [`wdk_sys`](../wdk_sys/index.html)'s direct bindings to the Windows Driver Kit (WDK). +//! [`wdk_sys`](../wdk_sys/index.html)'s direct bindings to the Windows Driver +//! Kit (WDK). use std::{collections::BTreeMap, path::PathBuf, str::FromStr}; @@ -49,10 +50,11 @@ const WDF_FUNC_ENUM_MOD_NAME: &str = "_WDFFUNCENUM"; /// A procedural macro that allows WDF functions to be called by name. /// -/// This macro is only intended to be used in the [`wdk_sys`](../wdk_sys/index.html) crate. Users wanting -/// to call WDF functions should use the macro in [`wdk_sys`](../wdk_sys/index.html). This macro differs -/// from the one in [`wdk_sys`](../wdk_sys/index.html) in that it must pass in the generated types from -/// `wdk-sys` as an argument to the macro. +/// This macro is only intended to be used in the +/// [`wdk_sys`](../wdk_sys/index.html) crate. Users wanting to call WDF +/// functions should use the macro in [`wdk_sys`](../wdk_sys/index.html). This +/// macro differs from the one in [`wdk_sys`](../wdk_sys/index.html) in that it +/// must pass in the generated types from `wdk-sys` as an argument to the macro. #[proc_macro] pub fn call_unsafe_wdf_function_binding(input_tokens: TokenStream) -> TokenStream { call_unsafe_wdf_function_binding_impl(TokenStream2::from(input_tokens)).into() From 5bcc2def439c1e2268cd5bf65121853a9a9157c8 Mon Sep 17 00:00:00 2001 From: Melvin Wang Date: Mon, 4 Aug 2025 16:37:14 -0700 Subject: [PATCH 3/3] Update crates/wdk-macros/src/lib.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Melvin Wang --- crates/wdk-macros/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wdk-macros/src/lib.rs b/crates/wdk-macros/src/lib.rs index 97bd1abb5..67e735602 100644 --- a/crates/wdk-macros/src/lib.rs +++ b/crates/wdk-macros/src/lib.rs @@ -52,7 +52,7 @@ const WDF_FUNC_ENUM_MOD_NAME: &str = "_WDFFUNCENUM"; /// /// This macro is only intended to be used in the /// [`wdk_sys`](../wdk_sys/index.html) crate. Users wanting to call WDF -/// functions should use the macro in [`wdk_sys`](../wdk_sys/index.html). This +/// [`wdk_sys`](../wdk_sys/index.html) as an argument to the macro. /// macro differs from the one in [`wdk_sys`](../wdk_sys/index.html) in that it /// must pass in the generated types from `wdk-sys` as an argument to the macro. #[proc_macro]