Skip to content

Rust SDK

Aptos provides an official Rust SDK in the aptos-rust-sdk GitHub repository and on crates.io. Add it to your Cargo.toml:

[dependencies]
aptos-sdk = "0.7"
tokio = { version = "1", features = ["full"] }
anyhow = "1"

To use the latest unreleased changes:

[dependencies]
aptos-sdk = { git = "https://github.com/aptos-labs/aptos-rust-sdk", package = "aptos-sdk" }

The SDK requires Rust 1.95+. Unlike the legacy crate in aptos-core, this SDK does not need git patches or a .cargo/config.toml tokio_unstable flag.

FeatureDefaultDescription
ed25519YesEd25519 signature scheme
secp256k1YesSecp256k1 ECDSA signatures
secp256r1YesSecp256r1 (P-256) ECDSA signatures
mnemonicYesBIP-39 mnemonic phrase support
indexerYesGraphQL indexer client
faucetYesFaucet integration for testnets
blsNoBLS12-381 signatures
macrosNoProc macros for type-safe contract bindings

Minimal build:

[dependencies]
aptos-sdk = { version = "0.7", default-features = false, features = ["ed25519"] }