---
title: Rust SDK
description: Official Rust crates for building on Solana.
h1: Rust SDK for Solana
---

## Client Crates

| Crate                    | Description                                | Docs                                              | GitHub                                                                         |
| ------------------------ | ------------------------------------------ | ------------------------------------------------- | ------------------------------------------------------------------------------ |
| solana-sdk               | Core SDK                                   | [View](https://docs.rs/solana-sdk/)               | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/sdk)               |
| solana-client            | Interact with Solana via RPC               | [View](https://docs.rs/solana-client/)            | [Source](https://github.com/anza-xyz/agave/tree/master/client)                 |
| solana-commitment-config | Transaction commitment level configuration | [View](https://docs.rs/solana-commitment-config/) | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/commitment-config) |

The `solana-sdk` crate is composed of the following component crates, which can
be used independently:

| Crate                       | Description                                                                     | Docs                                                 | GitHub                                                                            |
| --------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------- |
| solana-account              | Solana Account type                                                             | [View](https://docs.rs/solana-account/)              | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/account)              |
| solana-epoch-info           | Information about a Solana epoch                                                | [View](https://docs.rs/solana-epoch-info/)           | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/epoch-info)           |
| solana-epoch-rewards-hasher | Solana epoch rewards hasher                                                     | [View](https://docs.rs/solana-epoch-rewards-hasher/) | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/epoch-rewards-hasher) |
| solana-fee-structure        | Solana fee structures                                                           | [View](https://docs.rs/solana-fee-structure/)        | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/fee-structure)        |
| solana-inflation            | Configuration for Solana network inflation                                      | [View](https://docs.rs/solana-inflation/)            | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/inflation)            |
| solana-message              | Solana transaction message types                                                | [View](https://docs.rs/solana-message/)              | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/message)              |
| solana-program              | Solana Program                                                                  | [View](https://docs.rs/solana-program/)              | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/program)              |
| solana-program-memory       | Basic low-level memory operations for Solana                                    | [View](https://docs.rs/solana-program-memory/)       | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/program-memory)       |
| solana-pubkey               | Solana account addresses                                                        | [View](https://docs.rs/solana-pubkey/)               | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/pubkey)               |
| solana-sanitize             | Solana Message Sanitization                                                     | [View](https://docs.rs/solana-sanitize/)             | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/sanitize)             |
| solana-sdk-ids              | Solana SDK IDs                                                                  | [View](https://docs.rs/solana-sdk-ids/)              | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/sdk-ids)              |
| solana-sdk-macro            | Solana SDK Macro                                                                | [View](https://docs.rs/solana-sdk-macro/)            | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/sdk-macro)            |
| solana-serde                | Solana serde helpers                                                            | [View](https://docs.rs/solana-serde/)                | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/serde)                |
| solana-serde-varint         | Solana definitions for integers that serialize to variable size                 | [View](https://docs.rs/solana-serde-varint/)         | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/serde-varint)         |
| solana-short-vec            | Solana compact serde-encoding of vectors with small length                      | [View](https://docs.rs/solana-short-vec/)            | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/short-vec)            |
| solana-time-utils           | std::time utilities for Solana                                                  | [View](https://docs.rs/solana-time-utils/)           | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/time-utils)           |
| solana-keypair              | Concrete implementation of a Solana Signer                                      | [View](https://docs.rs/solana-keypair/)              | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/keypair)              |
| solana-offchain-message     | Solana offchain message signing                                                 | [View](https://docs.rs/solana-offchain-message/)     | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/offchain-message)     |
| solana-presigner            | A Solana Signer implementation representing an externally-constructed Signature | [View](https://docs.rs/solana-presigner/)            | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/presigner)            |
| solana-seed-derivable       | Solana trait defining the interface by which keys are derived                   | [View](https://docs.rs/solana-seed-derivable/)       | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/seed-derivable)       |
| solana-seed-phrase          | Solana functions for generating keypairs from seed phrases                      | [View](https://docs.rs/solana-seed-phrase/)          | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/seed-phrase)          |
| solana-shred-version        | Calculation of shred versions                                                   | [View](https://docs.rs/solana-shred-version/)        | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/shred-version)        |
| solana-signature            | Solana 64-byte signature type                                                   | [View](https://docs.rs/solana-signature/)            | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/signature)            |
| solana-signer               | Abstractions for Solana transaction signers                                     | [View](https://docs.rs/solana-signer/)               | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/signer)               |
| solana-transaction          | Solana transaction-types                                                        | [View](https://docs.rs/solana-transaction/)          | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/transaction)          |
| solana-transaction-error    | Solana TransactionError type                                                    | [View](https://docs.rs/solana-transaction-error/)    | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/transaction-error)    |

## Program Crates

Use `solana-program` to build onchain programs.

- [Example: Build a Solana program](/docs/programs/rust)

| Crate          | Description            | Docs                                   | GitHub                                                               |
| -------------- | ---------------------- | -------------------------------------- | -------------------------------------------------------------------- |
| solana-program | Build onchain programs | [View](https://docs.rs/solana-program) | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/program) |

Pinocchio is a zero-dependency library to create Solana programs in Rust and can
be used as a replacement for `solana-program` to write onchain programs.

| Crate     | Description                      | Docs                              | GitHub                                          |
| --------- | -------------------------------- | --------------------------------- | ----------------------------------------------- |
| pinocchio | Zero-dependency onchain programs | [View](https://docs.rs/pinocchio) | [Source](https://github.com/anza-xyz/pinocchio) |

<Callout type="warn">
  Pinocchio is still in development and will likely have breaking changes in the
  near future.
</Callout>

Pinocchio includes program-specific crates for interacting with Solana programs:

| Crate                              | Description                            | Docs                                                        | GitHub                                                                                      |
| ---------------------------------- | -------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| pinocchio-system                   | Interact with System program           | [View](https://docs.rs/pinocchio-system/)                   | [Source](https://github.com/anza-xyz/pinocchio/tree/main/programs/system)                   |
| pinocchio-token                    | Interact with Token program            | [View](https://docs.rs/pinocchio-token/)                    | [Source](https://github.com/anza-xyz/pinocchio/tree/main/programs/token)                    |
| pinocchio-token-2022               | Interact with Token-2022 program       | [View](https://docs.rs/pinocchio-token-2022/)               | [Source](https://github.com/anza-xyz/pinocchio/tree/main/programs/token-2022)               |
| pinocchio-associated-token-account | Interact with Associated Token program | [View](https://docs.rs/pinocchio-associated-token-account/) | [Source](https://github.com/anza-xyz/pinocchio/tree/main/programs/associated-token-account) |
| pinocchio-memo                     | Interact with Memo program             | [View](https://docs.rs/pinocchio-memo/)                     | [Source](https://github.com/anza-xyz/pinocchio/tree/main/programs/memo)                     |

## Interface Crates

| Crate                                  | Description                            | Docs                                                            | GitHub                                                                                   |
| -------------------------------------- | -------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| solana-system-interface                | Interact with System program           | [View](https://docs.rs/solana-system-interface/)                | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/system-interface)            |
| spl-token-interface                    | Interact with Token program            | [View](https://docs.rs/spl-token-interface/)                    | [Source](https://github.com/solana-program/token/tree/main/interface)                    |
| spl-token-2022-interface               | Interact with Token-2022 program       | [View](https://docs.rs/spl-token-2022-interface/)               | [Source](https://github.com/solana-program/token-2022/tree/main/interface)               |
| spl-associated-token-account-interface | Interact with Associated Token program | [View](https://docs.rs/spl-associated-token-account-interface/) | [Source](https://github.com/solana-program/associated-token-account/tree/main/interface) |
| solana-compute-budget-interface        | Interact with Compute Budget program   | [View](https://docs.rs/solana-compute-budget-interface/)        | [Source](https://github.com/anza-xyz/solana-sdk/tree/master/compute-budget-interface)    |
| spl-memo-interface                     | Interact with Memo program             | [View](https://docs.rs/spl-memo-interface/)                     | [Source](https://github.com/solana-program/memo/tree/main/interface)                     |
| spl-token-metadata-interface           | Interact with Token Metadata extension | [View](https://docs.rs/spl-token-metadata-interface/)           | [Source](https://github.com/solana-program/token-metadata/tree/main/interface)           |
| spl-token-group-interface              | Interact with Token Group extension    | [View](https://docs.rs/spl-token-group-interface/)              | [Source](https://github.com/solana-program/token-group/tree/main/interface)              |

## Signing & Key Management

For production backend signing across multiple key management backends:

| Crate           | Description                                                                                                               | Docs                                              | GitHub                                                         |
| --------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -------------------------------------------------------------- |
| solana-keychain | Unified signing: Memory, Vault, Privy, Turnkey, AWS KMS, Fireblocks, GCP KMS, CDP, Para, Dfns, Crossmint, Openfort, Utila | [Crate](https://crates.io/crates/solana-keychain) | [Source](https://github.com/solana-foundation/solana-keychain) |

Use feature flags to include only the backends you need. See the
[Keychain documentation](/docs/tools/keychain) and
[Choosing a backend](/docs/tools/keychain/choosing-a-backend) for setup and
custody-model guidance.
