Skip to content

Commit de5e6ed

Browse files
committed
Add special configuration for docsrs
bevyengine/bevy#12366 bevyengine/bevy#12642
1 parent fe3201d commit de5e6ed

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ categories = ["game-development", "network-programming"]
2020
license = "MIT OR Apache-2.0"
2121
include = ["/src", "/tests", "LICENSE*"]
2222

23+
[package.metadata.docs.rs]
24+
rustdoc-args = ["-Zunstable-options", "--cfg", "docsrs"]
25+
all-features = true
26+
2327
[dependencies]
2428
bevy_replicon = { version = "0.27", default-features = false }
2529
bevy_renet = { version = "0.0.12", default-features = false }
@@ -49,3 +53,11 @@ renet_transport = ["bevy_renet/transport"]
4953
[[test]]
5054
name = "transport"
5155
required-features = ["server", "client", "renet_transport"]
56+
57+
[[example]]
58+
name = "simple_box"
59+
required-features = ["server", "client", "renet_transport"]
60+
61+
[[example]]
62+
name = "tic_tac_toe"
63+
required-features = ["server", "client", "renet_transport"]

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ let connection_config = ConnectionConfig {
6363
For a full example of how to initialize a server or client see the example in the
6464
repository.
6565
*/
66+
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
6667

6768
#[cfg(feature = "client")]
6869
pub mod client;

0 commit comments

Comments
 (0)