Преглед изворни кода

Enable all features for docs.rs build (#2774)

acheron пре 1 година
родитељ
комит
60b10809c0
9 измењених фајлова са 27 додато и 0 уклоњено
  1. 1 0
      CHANGELOG.md
  2. 4 0
      client/Cargo.toml
  3. 2 0
      client/src/lib.rs
  4. 4 0
      lang/Cargo.toml
  5. 2 0
      lang/src/lib.rs
  6. 4 0
      lang/syn/Cargo.toml
  7. 2 0
      lang/syn/src/lib.rs
  8. 4 0
      spl/Cargo.toml
  9. 4 0
      spl/src/lib.rs

+ 1 - 0
CHANGELOG.md

@@ -37,6 +37,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 - cli: Show installation progress if Solana tools are not installed when using toolchain overrides ([#2757](https://github.com/coral-xyz/anchor/pull/2757)).
 - ts: Fix formatting enums ([#2763](https://github.com/coral-xyz/anchor/pull/2763)).
 - cli: Fix `migrate` command not working without global `ts-node` installation ([#2767](https://github.com/coral-xyz/anchor/pull/2767)).
+- client, lang, spl, syn: Enable all features for docs.rs build ([#2774](https://github.com/coral-xyz/anchor/pull/2774)).
 
 ### Breaking
 

+ 4 - 0
client/Cargo.toml

@@ -7,6 +7,10 @@ edition = "2021"
 license = "Apache-2.0"
 description = "Rust client for Anchor programs"
 
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
+
 [features]
 async = []
 debug = []

+ 2 - 0
client/src/lib.rs

@@ -1,3 +1,5 @@
+#![cfg_attr(docsrs, feature(doc_auto_cfg))]
+
 //! `anchor_client` provides an RPC client to send transactions and fetch
 //! deserialized accounts from Solana programs written in `anchor_lang`.
 

+ 4 - 0
lang/Cargo.toml

@@ -8,6 +8,10 @@ edition = "2021"
 license = "Apache-2.0"
 description = "Solana Sealevel eDSL"
 
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
+
 [features]
 allow-missing-optionals = ["anchor-derive-accounts/allow-missing-optionals"]
 anchor-debug = [

+ 2 - 0
lang/src/lib.rs

@@ -1,3 +1,5 @@
+#![cfg_attr(docsrs, feature(doc_auto_cfg))]
+
 //! Anchor ⚓ is a framework for Solana's Sealevel runtime providing several
 //! convenient developer tools.
 //!

+ 4 - 0
lang/syn/Cargo.toml

@@ -8,6 +8,10 @@ description = "Anchor syntax parsing and code generation tools"
 rust-version = "1.60"
 edition = "2021"
 
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
+
 [features]
 allow-missing-optionals = []
 anchor-debug = []

+ 2 - 0
lang/syn/src/lib.rs

@@ -1,3 +1,5 @@
+#![cfg_attr(docsrs, feature(doc_auto_cfg))]
+
 pub mod codegen;
 pub mod parser;
 

+ 4 - 0
spl/Cargo.toml

@@ -7,6 +7,10 @@ edition = "2021"
 license = "Apache-2.0"
 description = "CPI clients for SPL programs"
 
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
+
 [features]
 default = ["associated_token", "mint", "token", "token_2022"]
 associated_token = ["spl-associated-token-account"]

+ 4 - 0
spl/src/lib.rs

@@ -1,3 +1,7 @@
+#![cfg_attr(docsrs, feature(doc_auto_cfg))]
+
+//! Anchor CPI wrappers for popular programs in the Solana ecosystem.
+
 #[cfg(feature = "associated_token")]
 pub mod associated_token;