From f74347aac73bd256dc612811a8fe39475a762038 Mon Sep 17 00:00:00 2001 From: Jonathan Goren Date: Sun, 31 Mar 2024 16:12:54 +0300 Subject: [PATCH] Add features to generated docs --- Cargo.toml | 4 ++++ src/lib.rs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 33fe7ba..76d7d69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -131,3 +131,7 @@ required-features = ["std"] name = "benchmarks" harness = false required-features = ["std"] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/src/lib.rs b/src/lib.rs index f0f00b4..4c260bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -195,6 +195,7 @@ #![deny(rustdoc::broken_intra_doc_links)] #![deny(rustdoc::redundant_explicit_links)] #![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] extern crate alloc; @@ -280,5 +281,6 @@ pub use world::World; pub(crate) use query::ArchetypeSearcher; pub(crate) use vtable::ComponentVTable; +#[doc(inline)] #[cfg(feature = "derive")] pub use flax_derive::*;