Skip to content
solana_kit

Installation#

Solana Kit is a set of solana_kit_* crates that you depend on straight from the GitHub repository. This page covers which crates to add, the toolchain they need, the optional features, and the targets they build for.

Release status#

The SDK crates are not published to crates.io as usable releases yet. The solana_kit 0.0.0 crate on crates.io is a name reservation with no SDK APIs, and solana_kit_core 0.1.0 is unreleased. Until releases exist, depend on the crates with Cargo git dependencies, or path dependencies on a local checkout.

The project ships in independently verified phases, and many capabilities are still partial or pending. Check Parity and status before you rely on a specific feature.

Check your toolchain#

The workspace declares rust-version = "1.89" and edition 2024, so you need Rust 1.89 or newer.

The repository itself pins a newer toolchain for development in rust-toolchain.toml:

[toolchain]
channel = "1.99.1"
profile = "minimal"
components = ["clippy", "rustfmt"]
targets = ["wasm32-unknown-unknown", "wasm32-wasip1", "wasm32-wasip2"]

You only need that file if you work inside the repository. In your own project, install the WebAssembly targets you plan to build for:

rustup target add wasm32-unknown-unknown wasm32-wasip1 wasm32-wasip2

Add the crates#

Add the crates you need as git dependencies. Cargo finds each crate by name inside the repository workspace. A native application that reads RPC data and builds System transfers looks like this:

[dependencies]
solana_kit_core = { git = "https://github.com/pina-rs/solana_kit", features = ["crypto"] }
solana_kit_client = { git = "https://github.com/pina-rs/solana_kit" }
solana_kit_native = { git = "https://github.com/pina-rs/solana_kit" }
solana_kit_system = { git = "https://github.com/pina-rs/solana_kit" }
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }

All crates from one repository revision must match. Pin a commit with rev = "…" (the same value on every line) so a later push to main cannot change your build.

If you have a local checkout, use path dependencies instead:

[dependencies]
solana_kit_core = { path = "../solana_kit/crates/solana_kit_core", features = ["crypto"] }
solana_kit_client = { path = "../solana_kit/crates/solana_kit_client" }

Build#

cargo build

When the build succeeds, go to the Quick start and make your first RPC call.

Which crates to add#

Start with these. Program and service clients live in their own crates; see Crates for the full list.

CrateWhat it gives youno_std + alloc
solana_kit_coreAddresses, hashes, signatures, instructions, codecs, account snapshots, sysvars, legacy/v0/v1 messages and transactionsYes
solana_kit_clientTyped JSON-RPC Client and the Transport trait, with no runtime or network of its ownNo, needs std
solana_kit_nativeNativeHttp and NativeWebSocket transports on Tokio, with verified TLSNo
solana_kit_systemSystem Program instruction builders, parsers, nonce account codec and errorsYes
solana_kit_signersAsynchronous signer capability traits and compositionYes

solana_kit_client never starts a runtime and never opens a socket itself. A transport crate does the I/O: solana_kit_native on native hosts, solana_kit_browser in the browser, solana_kit_wasi on WASI Preview 2, and solana_kit_leptoskit inside LeptosKit apps.

Feature flags#

Every feature is off by default. There is no std feature: crates that are portable are always no_std + alloc, and solana_kit_client always uses std.

CrateFeatureAdds
solana_kit_corecryptoSHA-256, program-derived addresses, Ed25519 Keypair signing and verification, Transaction::sign and verify
solana_kit_corekeccakKeccak-256
solana_kit_corefixed-pointsExact decimal and binary fixed-point numbers
solana_kit_corebigint-codecsArbitrary-width integer codecs
solana_kit_coretext-codecsBase64 text codecs
solana_kit_clientconfirmation-factoriesReady-made signature confirmation over a WebSocket session plus HTTP
solana_kit_clientreactiveCaller-driven reactive stores and streams
solana_kit_clientresource-estimationCompute and resource limit estimation by simulation
solana_kit_nativekeyskeys::NativeEntropy for key generation and keys::write_keypair_new for keypair file backups
solana_kit_nativesurfpoolSurfpool program deployment helpers
solana_kit_nativemwaMobile Wallet Adapter transport
solana_kit_signerscryptoSigner traits implemented for core's Keypair
solana_kit_browserkeys, walletBrowser entropy and browser wallet support
solana_kit_wasiwebsocketWASI WebSocket transport

Most applications that sign transactions enable solana_kit_core/crypto. Without it you can still build and inspect messages, but you cannot sign locally or derive program addresses.

Targets#

TargetPortable cratesTransport
NativeYessolana_kit_native on Tokio
wasm32-unknown-unknown (browser)Yessolana_kit_browser (Window Fetch and WebSocket)
wasm32-wasip1YesNone; WASI HTTP needs Preview 2
wasm32-wasip2Yessolana_kit_wasi (WasiHttp)
LeptosKit interpreted guestYessolana_kit_leptoskit

"Portable crates" means solana_kit_core, solana_kit_client, solana_kit_system and solana_kit_signers. Each one compiles for every target above with no JavaScript or host imports. Choosing a runtime explains each transport and what has been verified on each host.

Next steps#

esc