diff --git a/sailfish/Cargo.toml b/sailfish/Cargo.toml index 9ecf0b4..37bf859 100644 --- a/sailfish/Cargo.toml +++ b/sailfish/Cargo.toml @@ -28,3 +28,7 @@ optional = true [build-dependencies] version_check = "0.9.2" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/sailfish/src/lib.rs b/sailfish/src/lib.rs index 6e5d632..34e345c 100644 --- a/sailfish/src/lib.rs +++ b/sailfish/src/lib.rs @@ -32,12 +32,14 @@ html_logo_url = "https://raw.githubusercontent.com/Kogia-sima/sailfish/master/resources/icon.png" )] #![cfg_attr(sailfish_nightly, feature(core_intrinsics))] +#![cfg_attr(docsrs, feature(doc_cfg))] pub mod runtime; use runtime::Buffer; pub use runtime::{RenderError, RenderResult}; #[cfg(feature = "derive")] +#[cfg_attr(docsrs, doc(cfg(feature = "derive")))] pub use sailfish_macros::TemplateOnce; /// Template that can be rendered with consuming itself.