Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: generate docs for all features on docs.rs #767

Merged
merged 3 commits into from May 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions client/http-client/Cargo.toml
Expand Up @@ -29,3 +29,10 @@ tokio = { version = "1.16", features = ["net", "rt-multi-thread", "macros"] }
[features]
default = ["tls"]
tls = ["hyper-rustls/webpki-tokio"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default docs.rs only builds the docs with default-features so we want all features to be documented.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, and the --cfg docsrs bit is about making it possible to conditionally compile stuff for doc purposes I gather!

Copy link
Member Author

@niklasad1 niklasad1 May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be equivalent to RUSTDOCFLAGS="--cfg docrs" cargo doc


[package.metadata.playground]
all-features = true
7 changes: 7 additions & 0 deletions client/transport/Cargo.toml
Expand Up @@ -54,3 +54,10 @@ web = [
"anyhow",
"thiserror",
]

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

[package.metadata.playground]
all-features = true
7 changes: 7 additions & 0 deletions client/ws-client/Cargo.toml
Expand Up @@ -23,3 +23,10 @@ serde_json = "1"
[features]
tls = ["jsonrpsee-client-transport/tls"]
default = ["tls"]

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

[package.metadata.playground]
all-features = true
7 changes: 7 additions & 0 deletions core/Cargo.toml
Expand Up @@ -68,3 +68,10 @@ async-wasm-client = [
serde_json = "1.0"
tokio = { version = "1.16", features = ["macros", "rt"] }
jsonrpsee = { path = "../jsonrpsee", features = ["server", "macros"] }

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

[package.metadata.playground]
all-features = true
7 changes: 7 additions & 0 deletions jsonrpsee/Cargo.toml
Expand Up @@ -37,3 +37,10 @@ macros = ["jsonrpsee-proc-macros", "jsonrpsee-types", "jsonrpsee-core/client", "
client = ["http-client", "ws-client", "wasm-client"]
server = ["http-server", "ws-server"]
full = ["client", "server", "macros", "async-client", "client-ws-transport"]

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

[package.metadata.playground]
all-features = true