System Requirements
Before building VecLabs from source, ensure you have the following tools installed:Rust
Version 1.85 or higher required for the core HNSW engine
Node.js
Version 18 or higher for the TypeScript SDK
Python
Version 3.10 or higher for the Python SDK
Solana CLI
Version 2.0 or higher for deploying programs
Anchor CLI 0.32+ is also required if you plan to build or test the Solana program.
Clone the Repository
Building the Rust Core
The Rust core contains the HNSW graph implementation, distance functions, Merkle tree generation, and encryption.Build in release mode (optional)
For production builds with full optimizations:Release builds enable SIMD optimizations and remove debug assertions.
Building the TypeScript SDK
The TypeScript SDK (@veclabs/solvec) provides the Node.js interface to VecLabs.
Install dependencies
@solana/web3.js and @coral-xyz/anchor.Build the SDK
dist/ directory.Building the Python SDK
The Python SDK (solvec) uses Hatch as its build backend.
Building the Solana Program
The Solana Anchor program handles on-chain Merkle root storage and collection management.Building Everything at Once
You can build all components sequentially with this one-liner:Troubleshooting
Cargo build fails with 'rustc version too old'
Cargo build fails with 'rustc version too old'
Update Rust to version 1.85 or higher:
npm install fails with dependency conflicts
npm install fails with dependency conflicts
Clear npm cache and reinstall:
anchor build not found
anchor build not found
Install Anchor CLI:
Python build fails with 'hatchling' not found
Python build fails with 'hatchling' not found
Ensure you have a recent version of pip:
Next Steps
Running Tests
Learn how to run the full test suite
Benchmarks
Run performance benchmarks and compare results