Skip to content

Commit

Permalink
Add special configuration for docsrs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Jul 20, 2024
1 parent a4433fb commit 5f0b5a4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ categories = ["game-development", "network-programming"]
license = "MIT OR Apache-2.0"
include = ["/src", "/tests", "LICENSE*"]

[package.metadata.docs.rs]
rustdoc-args = ["-Zunstable-options", "--cfg", "docsrs"]
all-features = true

[dependencies]
bevy_replicon = { version = "0.27", default-features = false}
bevy_renet = { version = "0.0.12", default-features = false }
Expand Down Expand Up @@ -49,3 +53,11 @@ renet_transport = ["bevy_renet/transport"]
[[test]]
name = "transport"
required-features = ["server", "client", "renet_transport"]

[[example]]
name = "simple_box"
required-features = ["server", "client", "renet_transport"]

[[example]]
name = "tic_tac_toe"
required-features = ["server", "client", "renet_transport"]
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ let connection_config = ConnectionConfig {
For a full example of how to initialize a server or client see the example in the
repository.
*/
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

#[cfg(feature = "client")]
mod client;
Expand Down

0 comments on commit 5f0b5a4

Please sign in to comment.