13 releases (7 breaking)

new 0.9.0 Jan 5, 2026
0.8.2 Nov 19, 2025
0.8.1 Oct 3, 2025
0.6.1 Mar 31, 2025
0.3.0 Oct 12, 2024

#1 in #lite-svm

Download history 227/week @ 2025-09-15 131/week @ 2025-09-22 267/week @ 2025-09-29 128/week @ 2025-10-06 187/week @ 2025-10-13 261/week @ 2025-10-20 244/week @ 2025-10-27 238/week @ 2025-11-03 262/week @ 2025-11-10 340/week @ 2025-11-17 354/week @ 2025-11-24 489/week @ 2025-12-01 410/week @ 2025-12-08 402/week @ 2025-12-15 284/week @ 2025-12-22 135/week @ 2025-12-29

1,278 downloads per month
Used in 5 crates (4 directly)

Apache-2.0

1.5MB
4K SLoC


LiteSVM

github crates.io docs.rs build status

📍 Overview

litesvm is a fast and lightweight library for testing Solana programs. It works by creating an in-process Solana VM optimized for program developers. This makes it much faster to run and compile than alternatives like solana-program-test and solana-test-validator. In a further break from tradition, it has an ergonomic API with sane defaults and extensive configurability for those who want it.

🚀 Getting Started

🔧 Installation

cargo add --dev litesvm

🤖 Minimal Example

use litesvm::LiteSVM;
use solana_keypair::Keypair;
use solana_message::Message;
use solana_pubkey::Pubkey;
use solana_signer::Signer;
use solana_system_interface::instruction::transfer;
use solana_transaction::Transaction;

let from_keypair = Keypair::new();
let from = from_keypair.pubkey();
let to = Pubkey::new_unique();

let mut svm = LiteSVM::new();
svm.airdrop(&from, 10_000).unwrap();

let instruction = transfer(&from, &to, 64);
let tx = Transaction::new(
    &[&from_keypair],
    Message::new(&[instruction], Some(&from)),
    svm.latest_blockhash(),
);
let tx_res = svm.send_transaction(tx).unwrap();

let from_account = svm.get_account(&from);
let to_account = svm.get_account(&to);
assert_eq!(from_account.unwrap().lamports, 4936);
assert_eq!(to_account.unwrap().lamports, 64);

🛠️ Developing litesvm

Run the tests

The tests in this repo use some test programs you need to build first (Solana CLI >= 1.18.8 required):

cd crates/litesvm/test_programs && cargo build-sbf

Then just run cargo test.

Dependencies

~27MB
~458K SLoC