Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,21 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.90"
- name: Install Rust nightly (required for doc_auto_cfg and docs.rs parity)
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The workflow text says nightly is required for doc_auto_cfg, but there’s no #![feature(doc_auto_cfg)] usage anywhere in the repo (aptos-sdk only enables doc_cfg under docsrs). Consider renaming this step to reference doc_cfg (or enable doc_auto_cfg if that’s what you intended to rely on).

Suggested change
- name: Install Rust nightly (required for doc_auto_cfg and docs.rs parity)
- name: Install Rust nightly (required for doc_cfg/docs.rs parity)

Copilot uses AI. Check for mistakes.
uses: dtolnay/rust-toolchain@nightly

- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Check documentation
- name: Check documentation (docs.rs parity)
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc -p aptos-sdk --no-deps --all-features
RUSTDOCFLAGS: --cfg docsrs -D warnings
run: cargo +nightly doc -p aptos-sdk --no-deps --all-features

- name: Check examples documentation
- name: Check macros documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc -p aptos-sdk --all-features --document-private-items
RUSTDOCFLAGS: --cfg docsrs -D warnings
run: cargo +nightly doc -p aptos-sdk-macros --no-deps --all-features

# Deploy docs to GitHub Pages on main branch
deploy-docs:
Expand All @@ -171,7 +169,7 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Install Rust nightly (required for doc_cfg feature)
- name: Install Rust nightly (required for doc_auto_cfg feature)
uses: dtolnay/rust-toolchain@nightly

Comment on lines +172 to 174
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

This step name mentions doc_auto_cfg, but the codebase doesn’t appear to use #![feature(doc_auto_cfg)] (only doc_cfg is enabled for docsrs). Updating the step name to match the actual feature being used would avoid confusion.

Copilot uses AI. Check for mistakes.
- name: Cache cargo
Expand All @@ -180,7 +178,7 @@ jobs:
- name: Build documentation
env:
RUSTDOCFLAGS: --cfg docsrs
run: cargo doc -p aptos-sdk --no-deps --all-features
run: cargo +nightly doc -p aptos-sdk --no-deps --all-features

- name: Add redirect to main crate
run: |
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Install Rust
- name: Install Rust nightly (for docs.rs parity check)
uses: dtolnay/rust-toolchain@nightly

- name: Install Rust stable (primary toolchain)
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.90"
Expand All @@ -88,10 +91,10 @@ jobs:
- name: Run tests
run: cargo test --all-targets --all-features

- name: Build documentation
- name: Build documentation (docs.rs parity)
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --all-features
RUSTDOCFLAGS: --cfg docsrs -D warnings
run: cargo +nightly doc --no-deps --all-features

publish-macros:
name: Publish aptos-sdk-macros
Expand Down
5 changes: 5 additions & 0 deletions crates/aptos-sdk-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ aptos-sdk = { workspace = true }
tokio = { workspace = true, features = ["full", "test-util"] }
trybuild = { workspace = true }

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

1 change: 1 addition & 0 deletions crates/aptos-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,4 @@ required-features = ["cli"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-unknown-linux-gnu"]
3 changes: 0 additions & 3 deletions crates/aptos-sdk/src/account/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ impl Ed25519Account {
///
/// Returns an error if the mnemonic phrase is invalid or if key derivation fails.
#[cfg(feature = "mnemonic")]
#[cfg_attr(docsrs, doc(cfg(feature = "mnemonic")))]
pub fn from_mnemonic(mnemonic: &str, index: u32) -> AptosResult<Self> {
let mnemonic = Mnemonic::from_phrase(mnemonic)?;
let private_key = mnemonic.derive_ed25519_key(index)?;
Expand All @@ -119,7 +118,6 @@ impl Ed25519Account {
///
/// Returns an error if mnemonic generation or key derivation fails.
#[cfg(feature = "mnemonic")]
#[cfg_attr(docsrs, doc(cfg(feature = "mnemonic")))]
pub fn generate_with_mnemonic() -> AptosResult<(Self, String)> {
let mnemonic = Mnemonic::generate(24)?;
let phrase = mnemonic.phrase().to_string();
Expand Down Expand Up @@ -264,7 +262,6 @@ impl Ed25519SingleKeyAccount {
///
/// Returns an error if the mnemonic phrase is invalid or if key derivation fails.
#[cfg(feature = "mnemonic")]
#[cfg_attr(docsrs, doc(cfg(feature = "mnemonic")))]
pub fn from_mnemonic(mnemonic: &str, index: u32) -> AptosResult<Self> {
let mnemonic = Mnemonic::from_phrase(mnemonic)?;
let private_key = mnemonic.derive_ed25519_key(index)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos-sdk/src/bin/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct Args {
builder: bool,
}

#[tokio::main]
#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
let args = Args::parse();

Expand Down
1 change: 0 additions & 1 deletion crates/aptos-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ pub use types::{AccountAddress, ChainId, HashValue};

// Re-export proc macros when the feature is enabled
#[cfg(feature = "macros")]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
pub use aptos_sdk_macros::{MoveStruct, aptos_contract, aptos_contract_file};

// Re-export aptos_bcs for use by the MoveStruct derive macro
Expand Down
2 changes: 0 additions & 2 deletions crates/aptos-sdk/src/transaction/authenticator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ pub enum AccountAuthenticator {
/// Keyless (OIDC-based) authentication (variant 5).
/// Uses ephemeral keys and ZK proofs for authentication.
#[cfg(feature = "keyless")]
#[cfg_attr(docsrs, doc(cfg(feature = "keyless")))]
Keyless {
/// The ephemeral public key bytes.
public_key: Vec<u8>,
Expand Down Expand Up @@ -362,7 +361,6 @@ impl AccountAuthenticator {
/// * `public_key` - The ephemeral public key bytes
/// * `signature` - The BCS-serialized `KeylessSignature`
#[cfg(feature = "keyless")]
#[cfg_attr(docsrs, doc(cfg(feature = "keyless")))]
pub fn keyless(public_key: Vec<u8>, signature: Vec<u8>) -> Self {
Self::Keyless {
public_key,
Expand Down
Loading