Solana Primitives Rust crate

Solana Primitives

Construct and submit Solana transactions in Rust — without pulling in the entire Solana SDK.

Rust
Blockchain
Solana
SDK

What it is

Solana Primitives is a lightweight Rust library that gives you the essential building blocks for working with the Solana blockchain — core types like Pubkey, Signature, Instruction, Transaction, and Message — so you can build and submit transactions without depending on the complete Solana SDK.

Features

  • Core types: Pubkey, Signature, Instruction, Transaction, and Message
  • Builder-pattern APIs with automatic account management
  • Type-safe instruction data construction
  • Pre-built helpers for the System, Token, and other programs
  • Program Derived Address (PDA) support
  • Comprehensive error handling with a minimal dependency footprint

How to use

Add the crate to your project, then build a transaction with the builder API:

cargo add solana-primitives

Why

The full Solana SDK is heavy when all you need is to assemble and sign a transaction. Solana Primitives keeps the dependency footprint small and the API focused, making it a good fit for wallets, services, and tools that construct Solana transactions in Rust.