]> git.bitcoin.ninja Git - rust-lightning/commit
Generate docs with features for docs.rs
authorJeffrey Czyz <jkczyz@gmail.com>
Sat, 12 Feb 2022 04:22:20 +0000 (22:22 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 18 Feb 2022 21:38:31 +0000 (15:38 -0600)
commit62b1e01ad99a46d5824912272962644d9d7ae002
tree8494ae3d6a7bcb6c376a9e62f4eaed011c07c592
parent27101609c46ed00ff3bb5299d097a9654b682782
Generate docs with features for docs.rs

Enable generating docs using --all-features or --features="std" where
applicable. Additionally, use doc_auto_cfg to tag items requiring a
feature.

https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#doc_auto_cfg-automatically-generate-doccfg

This requires building with nightly, which is what is used by docs.rs.

https://docs.rs/about/builds

To test locally, use:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc ...
12 files changed:
lightning-background-processor/Cargo.toml
lightning-background-processor/src/lib.rs
lightning-block-sync/Cargo.toml
lightning-block-sync/src/lib.rs
lightning-invoice/Cargo.toml
lightning-invoice/src/lib.rs
lightning-net-tokio/Cargo.toml
lightning-net-tokio/src/lib.rs
lightning-persister/Cargo.toml
lightning-persister/src/lib.rs
lightning/Cargo.toml
lightning/src/lib.rs