OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Litesvm

An open-source Rust library that creates an in-process Solana virtual machine for testing Solana programs.

Independent OpenViST project profile, based on linked sources.

Litesvm — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when Solana development calls for fast, lightweight and repeatable program testing inside the test process, particularly for local or CI workflows.

Who it is for

  • Solana program developers
  • Teams building automated unit and integration tests
  • Developers integrating Solana VM tests into CI workflows

Documented uses

  • Run local tests for Solana programs
  • Build automated unit and integration test suites
  • Execute Solana VM tests in CI without a separate validator process
Before you choose

Requirements & limits

The public repository lists an Apache-2.0 license. The project is implemented in Rust and supports Linux, macOS and Windows, with CLI development support identified.

  • In-process execution avoids requiring a separate validator process for the described testing workflow.
  • The documentation describes it as faster and lighter to run and compile than solana-program-test and solana-test-validator.
  • Configurable defaults and an ergonomic API are identified as part of the testing experience.
  • It is specifically oriented toward the Solana ecosystem and program development.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install LiteSVM and create a minimal Solana transfer test

Add LiteSVM as a development dependency and construct an in-process Solana VM test that funds an account, sends a transfer, and checks account balances.

Before you start

  • A Rust project using Cargo.
  • Solana program-testing dependencies matching the APIs used in the documented Rust example.

Steps

  1. Add LiteSVM as a development dependency with the command below.

    Documented command
    cargo add --dev litesvm
  2. Import LiteSVM, Solana address, keypair, message, signer, system-transfer, and transaction types shown in the minimal example.

  3. Create a sender keypair and destination address, instantiate LiteSVM::new(), and fund the sender with airdrop.

  4. Build a transfer transaction using svm.latest_blockhash(), submit it with svm.send_transaction, and retrieve both accounts with get_account.

  5. Assert the documented resulting balances: 4,936 lamports for the sender and 64 lamports for the recipient.

Expected outcome

A Rust test contains an in-process LiteSVM transfer scenario with balance assertions.

Guide limitations

  • The documentation does not specify Rust, Solana crate, or dependency-version requirements beyond the shown imports.
  • The documented example checks a simple transfer only; it does not provide a complete project file or test-run command.
  • The example uses unwrap() and therefore does not document custom error handling.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
30 September 2026
Original website title
LiteSVM/litesvm · Official homepage title · retained in its source language