The Three Layers
Speed Layer
Rust HNSW runs in-memory with no garbage collector. Delivers consistent sub-5ms p99 latency that Python and Go-based engines cannot match under concurrent load.
Storage Layer
Shadow Drive stores encrypted vectors on decentralized infrastructure. AES-256-GCM encryption with wallet-derived keys means VecLabs cannot read your data.
Trust Layer
Solana stores a 32-byte Merkle root after every write. Immutable, timestamped, and publicly verifiable proof of your collection’s state.
Why This Design Wins
Rust HNSW Core
The query engine runs entirely in Rust with no garbage collector. This is a deliberate technical decision, not a trendy language choice. Why Rust matters:- Python and Go have garbage collectors that introduce unpredictable latency spikes under load
- Rust has no GC, meaning consistent, predictable sub-millisecond latency at scale
- At 100K vectors (384 dimensions), VecLabs delivers 1.9ms p50, 4.3ms p99
- These numbers don’t degrade under concurrent query load
solvec-core/src/hnsw.rs includes:
- 31 unit tests covering insert, delete, update, query operations
- Full serialization support for persistence
- Three distance metrics: cosine, euclidean, dot product
- Bidirectional graph connections with automatic pruning
Performance Benchmark: On Apple M2 with 100K vectors (384 dims), VecLabs achieves p50=1.9ms, p95=2.8ms, p99=4.3ms. Full methodology in
/benchmarks/COMPARISON.md.Shadow Drive Storage
Vectors are encrypted client-side before leaving the SDK. The encryption key is derived from your Solana wallet, meaning:- VecLabs cannot decrypt your data — we never see the plaintext vectors
- Storage cost is ~$0.000039 per MB per epoch — approximately 88% cheaper than Pinecone
- No cloud markup — you’re paying for decentralized storage, not our infrastructure overhead
encryption.rs:12-35, vectors are encrypted using AES-256-GCM:
Solana Trust Layer
Blockchain is not a storage layer — it’s a trust layer. You don’t put 1,536 float32 values on Solana. You put a 32-byte Merkle root on Solana. After every write operation:- SDK builds a Merkle tree from all vector IDs in the collection
- Computes the SHA-256 Merkle root (32 bytes)
- Posts the root to Solana via Anchor program
- Transaction finalizes in ~400ms with $0.00025 cost
Data Flow
Upsert Operation
Query Operation
Queries run entirely against the in-memory Rust HNSW index. No network calls. No decryption overhead. This is why latency stays sub-5ms even at 100K vectors.Verification
Anyone can verify the collection state without trusting VecLabs. The proof is cryptographic and the root is permanently on-chain.Cost Comparison
| Cost Component | VecLabs | Pinecone s1 |
|---|---|---|
| 1M vectors storage | ~$0.04/month (Shadow Drive) | $70/month |
| Merkle root updates | ~$0.00025/tx (Solana) | Included in pod cost |
| Query compute | Rust binary on your infra | Pinecone cloud |
| Total (1M vectors) | ~$8-20/month | $70/month |
Component Status
Production Ready
- Rust HNSW core (31 tests passing)
- AES-256-GCM encryption
- Merkle tree + proof generation
- Solana Anchor program (devnet)
- TypeScript SDK (alpha)
- Python SDK (alpha)
In Progress
- Shadow Drive persistence
- WASM Rust bridge
- Agent memory demo
- LangChain integration
- Mainnet deployment
Why This Architecture Matters
For AI engineers: You get Pinecone-compatible API with better performance and lower cost. For enterprise teams: You get cryptographic proof of data provenance — critical for healthcare, legal, and financial AI where “what did the agent know and when” is a compliance requirement. For decentralization: No single point of failure. Your data isn’t on our servers. The history is on-chain. If VecLabs disappeared tomorrow, your collections remain verifiable and accessible.Next: Dive into HNSW
Learn how the Hierarchical Navigable Small World algorithm delivers sub-5ms queries.