Saltar al contenido principal

Rust API

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

Some important crates:

  • solana-program — Imported by programs running on Solana, compiled to BPF. 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 off-chain 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-clap-utils — Routines for setting up a CLI, using clap, as used by the main Solana CLI.