Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit e4fd321

Browse files
umgefahrenmonoid
authored andcommitted
chore(upnp, webrtc): add missing docs.rs metadata
Includes necessary package metadata to improve documentation on docs.rs (shows which items are behind a cfg). Read more on: libp2p#2983 Pull-Request: libp2p#4599.
1 parent 1b7afe7 commit e4fd321

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

protocols/upnp/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ tokio = ["igd-next/aio_tokio", "dep:tokio"]
2525

2626
[lints]
2727
workspace = true
28+
29+
# Passing arguments to the docsrs builder in order to properly document cfg's.
30+
# More information: https://docs.rs/about/builds#cross-compiling
31+
[package.metadata.docs.rs]
32+
all-features = true
33+
rustdoc-args = ["--cfg", "docsrs"]
34+
rustc-args = ["--cfg", "docsrs"]

transports/webrtc/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,10 @@ required-features = ["tokio"]
4848

4949
[lints]
5050
workspace = true
51+
52+
# Passing arguments to the docsrs builder in order to properly document cfg's.
53+
# More information: https://docs.rs/about/builds#cross-compiling
54+
[package.metadata.docs.rs]
55+
all-features = true
56+
rustdoc-args = ["--cfg", "docsrs"]
57+
rustc-args = ["--cfg", "docsrs"]

transports/webrtc/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,8 @@
7979
//! hand-crate the SDP answer generated by the remote, this is problematic. A way to solve this
8080
//! is to make the hash a part of the remote's multiaddr. On the server side, we turn
8181
//! certificate verification off.
82+
83+
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
84+
8285
#[cfg(feature = "tokio")]
8386
pub mod tokio;

0 commit comments

Comments
 (0)