Skip to content

Commit 14bb801

Browse files
authored
docs(*): Document cargo features in docs (#2761)
## Description This adds the features needed for an API to the generated docs for the remaining workspace crates. Only the iroh crate itself does not yet document this. ## Breaking Changes none ## Notes & open questions I can for the life of me not get this to work for the iroh crate itself... No idea why. Feel free to give it a try. ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - ~~[ ] Tests if relevant.~~ - ~~[ ] All breaking changes documented.~~
1 parent 3a6e19a commit 14bb801

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

iroh-blobs/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ redb = ["dep:redb"]
7777

7878
[package.metadata.docs.rs]
7979
all-features = true
80+
rustdoc-args = ["--cfg", "iroh_docsrs"]
8081

8182
[[example]]
8283
name = "provide-bytes"

iroh-blobs/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
//! [iroh]: https://docs.rs/iroh
2626
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
2727
#![recursion_limit = "256"]
28+
#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
2829

2930
#[cfg(feature = "downloader")]
31+
#[cfg_attr(iroh_docsrs, doc(cfg(feature = "downloader")))]
3032
pub mod downloader;
3133
pub mod export;
3234
pub mod format;

0 commit comments

Comments
 (0)