A TypeScript harness that drives the real Solana SVM directly — no validator, no WASM, no subprocess. Millisecond feedback on every change.
Why svmforge
Capabilities
Calls directly into the same Solana SVM that mainnet validators use. No bank layer, no AccountsDB, no subprocess — just your program executing in pure isolation.
const result = svm.processInstruction(ix, accounts);
console.log(result.success); // true
console.log(result.computeUnitsConsumed); // 3842n
console.log(result.resultingAccounts); // final stateTest output
Every test reports exact compute units, real account state, and program error codes. No mocks. No stubs. The actual SVM result.
Get started
import { MolluskSvm, systemAccount, checkSuccess, checkAccountLamports } from 'svmforge';
const svm = new MolluskSvm(PROGRAM_ID, 'target/deploy/my_program');
svm.processAndValidateInstruction(
transferIx(ALICE, BOB, 500_000_000n),
[
{ pubkey: ALICE, account: systemAccount(1_000_000_000n) },
{ pubkey: BOB, account: systemAccount(0n) },
],
[checkSuccess(), checkAccountLamports(BOB, 500_000_000n)],
);const ctx = MolluskContext.createDefault();
ctx.setAccount(ALICE, systemAccount(10_000_000_000n));
ctx.setAccount(BOB, systemAccount(0n));
ctx.processInstruction(transferIx(ALICE, BOB, 1_000_000_000n));
ctx.processInstruction(transferIx(ALICE, BOB, 2_000_000_000n));
// State persists automatically between calls
console.log(ctx.getAccount(ALICE)?.lamports); // 7_000_000_000nsvmforge loads the compiled .so binary — it has no knowledge of the framework used to write the program.