mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 05:21:08 +00:00
generate docs for feature gated items (#1332)
* generate docs for feature-gated items on crates.io * add newline in Cargo.toml * unify newlines * fix clippy * introduce macros for features * commit missing file * Update subxt/src/lib.rs * make it compile
This commit is contained in:
+7
-2
@@ -5,14 +5,12 @@ authors.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
publish = true
|
||||
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
documentation = "https://docs.rs/subxt-codegen"
|
||||
homepage.workspace = true
|
||||
description = "Generate an API for interacting with a substrate node from FRAME metadata"
|
||||
|
||||
|
||||
[features]
|
||||
default = []
|
||||
fetch-metadata = ["dep:jsonrpsee", "dep:tokio", "dep:frame-metadata"]
|
||||
@@ -38,3 +36,10 @@ getrandom = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
scale-info = { workspace = true, features = ["bit-vec"] }
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["fetch-metadata"]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[package.metadata.playground]
|
||||
defalt-features = true
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//! be used directly if preferable.
|
||||
|
||||
#![deny(unused_crate_dependencies, missing_docs)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
mod api;
|
||||
pub mod error;
|
||||
@@ -16,6 +17,7 @@ mod ir;
|
||||
// macro and CLI tool, so they only live here because this is a common
|
||||
// crate that both depend on.
|
||||
#[cfg(feature = "fetch-metadata")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "fetch-metadata")))]
|
||||
pub mod fetch_metadata;
|
||||
|
||||
#[cfg(feature = "web")]
|
||||
|
||||
Reference in New Issue
Block a user