Skip to content

Commit

Permalink
add doc_auto_cfg to relevant sdk crates (#3121)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey authored Oct 12, 2024
1 parent 6210454 commit e32281d
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sdk/account-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ bincode = ["dep:bincode", "dep:serde"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]
2 changes: 1 addition & 1 deletion sdk/account-info/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Account information.
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
use {
solana_program_error::ProgramError,
solana_program_memory::sol_memset,
Expand Down
2 changes: 2 additions & 0 deletions sdk/account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ serde = ["dep:serde", "dep:serde_bytes", "dep:serde_derive"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]
1 change: 1 addition & 0 deletions sdk/account/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
//! The Solana [`Account`] type.
#[cfg(feature = "dev-context-only-utils")]
Expand Down
2 changes: 2 additions & 0 deletions sdk/hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ edition = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[dependencies]
borsh = { workspace = true, optional = true }
Expand Down
1 change: 1 addition & 0 deletions sdk/hash/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#[cfg(feature = "borsh")]
use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
Expand Down
2 changes: 2 additions & 0 deletions sdk/instruction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ std = []

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[lints]
workspace = true
1 change: 1 addition & 0 deletions sdk/instruction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
//! while executing a given instruction is also included in `Instruction`, as
//! [`AccountMeta`] values. The runtime uses this information to efficiently
//! schedule execution of transactions.
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![allow(clippy::arithmetic_side_effects)]
#![no_std]
Expand Down
2 changes: 2 additions & 0 deletions sdk/program-error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ serde = ["dep:serde", "dep:serde_derive"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]
1 change: 1 addition & 0 deletions sdk/program-error/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! The [`ProgramError`] type and related definitions.
#![allow(clippy::arithmetic_side_effects)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#[cfg(feature = "borsh")]
use borsh::io::Error as BorshIoError;
#[cfg(feature = "serde")]
Expand Down
2 changes: 2 additions & 0 deletions sdk/pubkey/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ std = []

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[lints]
workspace = true
1 change: 1 addition & 0 deletions sdk/pubkey/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Solana account addresses.
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![allow(clippy::arithmetic_side_effects)]

Expand Down
2 changes: 2 additions & 0 deletions sdk/signature/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ verify = ["dep:ed25519-dalek"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
all-features = true
rustdoc-args = ["--cfg=docsrs"]

[lints]
workspace = true
1 change: 1 addition & 0 deletions sdk/signature/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! 64-byte signature type.
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#[cfg(any(test, feature = "verify"))]
use core::convert::TryInto;
Expand Down

0 comments on commit e32281d

Please sign in to comment.