From 2bf1073bc88f6b5bad5887c171dc8b18d6a6e3da Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Sat, 12 Oct 2024 18:15:46 +0000 Subject: [PATCH] Improve rendered documentation - Add metadata so docs.rs calls cargo doc with `--all-features` - Include `README.md` in the top-level crate documentation --- Cargo.toml | 6 +++++- src/lib.rs | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 391befd..4b7aad0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,4 +28,8 @@ doctest = false [profile.release] codegen-units = 1 -lto = true \ No newline at end of file +lto = true + +[package.metadata.docs.rs] +# build docs for all features +all-features = true diff --git a/src/lib.rs b/src/lib.rs index a91fe07..1030890 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +#![doc = include_str!("../README.md")] #![no_std] mod dht;