{"id":13544190,"url":"https://github.com/LiteSVM/litesvm","last_synced_at":"2025-04-02T14:30:32.649Z","repository":{"id":225792496,"uuid":"720395663","full_name":"LiteSVM/litesvm","owner":"LiteSVM","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-03T17:41:05.000Z","size":2724,"stargazers_count":166,"open_issues_count":8,"forks_count":31,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-04T09:11:12.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LiteSVM.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-18T11:02:30.000Z","updated_at":"2025-01-30T02:24:57.000Z","dependencies_parsed_at":"2024-04-09T14:33:23.257Z","dependency_job_id":"fbc523ea-6831-4895-a8fa-fa35625eebe0","html_url":"https://github.com/LiteSVM/litesvm","commit_stats":null,"previous_names":["litesvm/litesvm"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteSVM%2Flitesvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteSVM%2Flitesvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteSVM%2Flitesvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteSVM%2Flitesvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiteSVM","download_url":"https://codeload.github.com/LiteSVM/litesvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246465256,"owners_count":20781919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T11:00:43.516Z","updated_at":"2025-04-02T14:30:32.644Z","avatar_url":"https://github.com/LiteSVM.png","language":"Rust","funding_links":[],"categories":["Rust","Developer Tools","Developer Resources"],"sub_categories":["Testing Environment","Testing Programs"],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/litesvm/litesvm/master/logo.jpeg\" width=\"50%\" height=\"50%\"\u003e\n\u003c/div\u003e\n\n---\n\n# LiteSVM\n\n[\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/github-LiteSVM/litesvm-8da0cb?style=for-the-badge\u0026labelColor=555555\u0026logo=github\" height=\"20\"\u003e](https://github.com/LiteSVM/litesvm)\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/litesvm.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust\" height=\"20\"\u003e](https://crates.io/crates/litesvm)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-litesvm-66c2a5?style=for-the-badge\u0026labelColor=555555\u0026logo=docs.rs\" height=\"20\"\u003e](https://docs.rs/litesvm/latest/litesvm/)\n[\u003cimg alt=\"build status\" src=\"https://img.shields.io/github/actions/workflow/status/LiteSVM/litesvm/CI.yml?branch=master\u0026style=for-the-badge\" height=\"20\"\u003e](https://github.com/LiteSVM/litesvm/actions?query=branch%3Amaster)\n\n## 📍 Overview\n\n`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.\n\n## 🚀 Getting Started\n\n### 🔧 Installation\n\n```sh\ncargo add --dev litesvm\n```\n\n### 🤖 Minimal Example\n\n```rust\nuse litesvm::LiteSVM;\nuse solana_keypair::Keypair;\nuse solana_message::Message;\nuse solana_pubkey::Pubkey;\nuse solana_signer::Signer;\nuse solana_system_interface::instruction::transfer;\nuse solana_transaction::Transaction;\n\nlet from_keypair = Keypair::new();\nlet from = from_keypair.pubkey();\nlet to = Pubkey::new_unique();\n\nlet mut svm = LiteSVM::new();\nsvm.airdrop(\u0026from, 10_000).unwrap();\n\nlet instruction = transfer(\u0026from, \u0026to, 64);\nlet tx = Transaction::new(\n    \u0026[\u0026from_keypair],\n    Message::new(\u0026[instruction], Some(\u0026from)),\n    svm.latest_blockhash(),\n);\nlet tx_res = svm.send_transaction(tx).unwrap();\n\nlet from_account = svm.get_account(\u0026from);\nlet to_account = svm.get_account(\u0026to);\nassert_eq!(from_account.unwrap().lamports, 4936);\nassert_eq!(to_account.unwrap().lamports, 64);\n```\n\n### 🛠️ Developing litesvm\n\n#### Run the tests\n\nThe tests in this repo use some test programs you need to build first (Solana CLI \u003e= 1.18.8 required):\n\n```cd crates/litesvm/test_programs \u0026\u0026 cargo build-sbf```\n\nThen just run `cargo test`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLiteSVM%2Flitesvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLiteSVM%2Flitesvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLiteSVM%2Flitesvm/lists"}