Rust Client for Solana

Solana's Rust crates are published to crates.io and can be found on docs.rs with the solana- prefix.

Hello World: Get started with Solana development

To quickly get started with Solana development and build your first Rust program, take a look at these detailed quick start guides:

Rust Crates #

The following are the most important and commonly used Rust crates for Solana development:

  • solana-program — Imported by programs running on Solana, compiled to SBF. This crate contains many fundamental data types and is re-exported from solana-sdk, which cannot be imported from a Solana program.

  • solana-sdk — The basic offchain SDK, it re-exports solana-program and adds more APIs on top of that. Most Solana programs that do not run on-chain will import this.

  • solana-client — For interacting with a Solana node via the JSON RPC API.

  • solana-cli-config — Loading and saving the Solana CLI configuration file.

  • solana-clap-utils — Routines for setting up a CLI, using clap, as used by the main Solana CLI. Includes functions for loading all types of signers supported by the CLI.