From 430212e79cbbf9fc0cdae145cdf1928ae4de13ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ma=C4=87kowski?= Date: Fri, 9 Jan 2026 15:08:42 +0000 Subject: [PATCH] chore: add docs.rs metadata to Cargo.toml and use `doc_cfg` We use the nightly [`doc_cfg`](https://doc.rust-lang.org/unstable-book/language-features/doc-cfg.html) feature to automatically annotate modules as only available with specific feature flags enabled in the docs. This requires some metadata in Cargo.toml that was missing. --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index fa07ad9..e25b51e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,10 @@ categories = ["embedded", "encoding", "no-std::no-alloc", "parsing"] keywords = ["device-tree", "fdt", "dtb", "dts", "parser"] readme = "README.md" +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + [features] default = [] write = ["dep:indexmap", "dep:twox-hash"]