diff --git a/CHANGELOG.md b/CHANGELOG.md index f05a5d0c38..084c9d1c8a 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/client/Cargo.toml b/client/Cargo.toml index 635fcf751d..8429fca714 100644 --- a/client/Cargo.toml +++ b/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 = [] diff --git a/client/src/lib.rs b/client/src/lib.rs index 1fc4e886f0..59b15985ed 100644 --- a/client/src/lib.rs +++ b/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`. diff --git a/lang/Cargo.toml b/lang/Cargo.toml index 3d2879f138..af84896bf8 100644 --- a/lang/Cargo.toml +++ b/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 = [ diff --git a/lang/src/lib.rs b/lang/src/lib.rs index ceb139ccc6..9ad5bdf818 100644 --- a/lang/src/lib.rs +++ b/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. //! diff --git a/lang/syn/Cargo.toml b/lang/syn/Cargo.toml index c1f0bad358..3a9dca8360 100644 --- a/lang/syn/Cargo.toml +++ b/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 = [] diff --git a/lang/syn/src/lib.rs b/lang/syn/src/lib.rs index 9f8ca526c5..7249d4dc3c 100644 --- a/lang/syn/src/lib.rs +++ b/lang/syn/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + pub mod codegen; pub mod parser; diff --git a/spl/Cargo.toml b/spl/Cargo.toml index d61deef5be..875b916631 100644 --- a/spl/Cargo.toml +++ b/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"] diff --git a/spl/src/lib.rs b/spl/src/lib.rs index 6ec5129ff4..5e2a01c610 100644 --- a/spl/src/lib.rs +++ b/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;