You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+80-12Lines changed: 80 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,35 @@
11
11
12
12
`hpsvm` 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.
13
13
14
-
This is a pure Rust library with no Node.js dependencies.
14
+
This is a pure Rust library, making it ideal for Rust-native Solana development workflows.
15
+
16
+
## ✨ Features
17
+
18
+
- 🚀 **High Performance**: In-process VM runs tests significantly faster than external validators
19
+
- 🛠️ **Easy to Use**: Simple API with sensible defaults and comprehensive configuration options
20
+
- 🔧 **Pure Rust**: No external dependencies or runtime requirements beyond Rust
21
+
- 📊 **Comprehensive Testing**: Supports transactions, account management, and program execution
22
+
- 🔄 **Configurable**: Extensive options for customizing the test environment
23
+
- 📚 **Well Documented**: Full API documentation and examples
15
24
16
25
## 🚀 Getting Started
17
26
27
+
### Prerequisites
28
+
29
+
- Rust
30
+
- Solana CLI (for building test programs)
31
+
18
32
### 🔧 Installation
19
33
34
+
Add `hpsvm` as a development dependency to your Solana program project:
35
+
20
36
```sh
21
37
cargo add --dev hpsvm
22
38
```
23
39
24
-
### 🤖 Minimal Example
40
+
### 🤖 Quick Example
41
+
42
+
Here's a minimal example that demonstrates creating a test environment, airdropping SOL, and executing a transfer transaction:
For more advanced usage, including custom configurations, program deployment, and complex transaction scenarios, see the [full documentation](https://docs.rs/hpsvm).
87
+
88
+
## 🛠️ Developing hpsvm
57
89
58
-
#### Run the tests
90
+
### Building Test Programs
91
+
92
+
The test suite uses Solana programs that need to be built first:
93
+
94
+
```bash
95
+
cd crates/hpsvm/test_programs
96
+
cargo build-sbf
97
+
```
59
98
60
-
The tests in this repo use some test programs you need to build first (Solana CLI >= 1.18.8 required):
0 commit comments