From f2aa90619d7a93378ad20e959c2abef227caf38e Mon Sep 17 00:00:00 2001 From: Kun Lai Date: Thu, 15 Oct 2026 17:32:27 +0800 Subject: [PATCH] fix(blktrace-rs): repair the docs.rs build and document all features The docs.rs build of 0.1.0 failed because doc_auto_cfg was removed from nightly rustdoc and merged into doc_cfg. Switch to doc_cfg, build the documentation with all features enabled so the async API appears, and release 0.1.1. Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai --- Cargo.lock | 2 +- blktrace-rs/Cargo.toml | 7 ++++++- blktrace-rs/src/lib.rs | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e686f28..5e6bfb8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -458,7 +458,7 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blktrace-rs" -version = "0.1.0" +version = "0.1.1" dependencies = [ "bindgen 0.71.1", "mnt", diff --git a/blktrace-rs/Cargo.toml b/blktrace-rs/Cargo.toml index b5d633b..a9b00cf 100644 --- a/blktrace-rs/Cargo.toml +++ b/blktrace-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blktrace-rs" -version = "0.1.0" +version = "0.1.1" edition.workspace = true authors.workspace = true rust-version = "1.85" @@ -10,6 +10,11 @@ description = "Capture and parse Linux block-layer I/O traces via kernel ioctls, keywords = ["blktrace", "block-io", "tracing", "linux"] categories = ["os::linux-apis"] +# docs.rs builds with default features, which excludes the async API; +# build the documentation with everything enabled instead. +[package.metadata.docs.rs] +all-features = true + [lib] name = "blktrace_rs" diff --git a/blktrace-rs/src/lib.rs b/blktrace-rs/src/lib.rs index 47ee15f..34de387 100644 --- a/blktrace-rs/src/lib.rs +++ b/blktrace-rs/src/lib.rs @@ -33,7 +33,9 @@ //! async callers never stall their executor. #![warn(missing_docs)] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +// On docs.rs builds this shows feature-gated items (the async API) with +// cfg badges instead of hiding them. +#![cfg_attr(docsrs, feature(doc_cfg))] #[cfg(not(target_os = "linux"))] compile_error!("blktrace-rs only supports Linux");