Thank you for your interest in contributing to VecStore! We welcome contributions from everyone.
# Fork on GitHub, then:
git clone https://github.com/YOUR_USERNAME/vecstore.git
cd vecstoreRequirements:
- Rust 1.92+ (
rustup update stable) - cargo (comes with Rust)
Optional (for full features):
- Python 3.8+ (for Python bindings)
- Docker (for testing deployment)
# Install Rust if needed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Verify installation
rustc --version
cargo --version# Build the project
cargo build
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Format code
cargo fmt
# Check for common mistakes
cargo clippyAll tests should pass: Currently 349/349 tests passing.
# Create a feature branch
git checkout -b feat/your-amazing-feature
# Make your changes
# ... edit files ...
# Run tests
cargo test
# Format code
cargo fmt
# Commit your changes
git add .
git commit -m "Add amazing feature"# Push to your fork
git push origin feat/your-amazing-feature
# Go to GitHub and create a Pull RequestWe'd love help with:
- Language bindings (Go, Java, C#, Ruby)
- Document loaders (Notion, Confluence, Google Docs)
- Performance benchmarks (vs Qdrant, Weaviate, Pinecone)
- Real-world examples (RAG apps, semantic search)
- Bug fixes and performance improvements
- Tutorials and guides
- API documentation improvements
- Example code and use cases
- Translation to other languages
- Edge case tests
- Property-based tests
- Load tests and benchmarks
- Integration tests
- New distance metrics
- Additional fusion strategies
- More tokenizer implementations
- Query optimizations
VecStore follows standard Rust conventions:
# Format your code (required before PR)
cargo fmt
# Check for common issues
cargo clippy
# Run all checks
cargo fmt && cargo clippy && cargo testKey principles:
- ✅ Write tests for new features
- ✅ Update documentation
- ✅ Keep functions small and focused
- ✅ Use meaningful variable names
- ✅ Add comments for complex logic
- ❌ Don't break existing tests
- ❌ Don't add unnecessary dependencies
-
Create a feature branch from
maingit checkout -b feat/your-feature # or git checkout -b fix/your-bugfix -
Write tests for your changes
- Add tests in
tests/directory - Or inline tests with
#[cfg(test)]
- Add tests in
-
Update documentation
- Update README.md if adding features
- Add doc comments (
///) to public APIs - Update CHANGELOG.md
-
Format and test
cargo fmt cargo clippy cargo test -
Commit with clear messages
feat: Add support for Go bindings fix: Resolve HNSW index corruption on crash docs: Improve quickstart guide test: Add property-based tests for filters -
Push and create PR
- Describe what your PR does
- Reference any related issues
- Include test results if applicable
-
Respond to review feedback
- Address reviewer comments
- Update your branch as needed
- Be patient and respectful
# All tests
cargo test
# Specific test
cargo test test_query_planning
# Test with output
cargo test -- --show-output
# Integration tests only
cargo test --test test_final_optimizationsExample unit test:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_my_feature() {
// Arrange
let mut store = VecStore::open("test.db").unwrap();
// Act
let result = store.my_feature().unwrap();
// Assert
assert_eq!(result.len(), 10);
}
}Example integration test (tests/test_my_feature.rs):
use vecstore::VecStore;
use tempfile::TempDir;
#[test]
fn test_my_feature_integration() {
let temp_dir = TempDir::new().unwrap();
let mut store = VecStore::open(temp_dir.path().join("test.db")).unwrap();
// Test your feature
// ...
assert!(/* your assertion */);
}Add doc comments to public APIs:
/// Explains how a query will be executed and estimates its cost.
///
/// This is useful for:
/// - Understanding query performance
/// - Optimizing complex queries
/// - Debugging slow queries
///
/// # Example
///
/// ```no_run
/// # use vecstore::{VecStore, Query};
/// let store = VecStore::open("vectors.db")?;
/// let plan = store.explain_query(query)?;
/// println!("Estimated cost: {:.2}", plan.estimated_cost);
/// # Ok::<(), anyhow::Error>(())
/// ```
pub fn explain_query(&self, q: Query) -> Result<QueryPlan> {
// ...
}# Build and open documentation
cargo doc --open
# Build with private items
cargo doc --document-private-items --openWe have Rust and Python. Help us add:
- Go -
cgobindings - Java - JNI bindings
- C# - P/Invoke bindings
- Ruby -
ffibindings
We support PDF, Markdown, HTML, etc. Add loaders for:
- Notion exports
- Confluence pages
- Google Docs
- Microsoft Word (
.docx)
Help us document performance:
- Compare with Qdrant, Weaviate, Pinecone
- Measure latency at different scales
- Test different HNSW parameters
- Benchmark query planning overhead
Create real-world examples:
- RAG chatbot with VecStore
- Semantic code search
- Document Q&A system
- Recommendation engine
# Run with debug output
RUST_LOG=debug cargo test test_name -- --nocapture
# Use rust-gdb or rust-lldb
rust-gdb ./target/debug/vecstore# CPU profiling (requires `perf`)
cargo build --release
perf record target/release/vecstore
perf report
# Memory profiling (requires `valgrind`)
cargo build
valgrind --tool=massif target/debug/vecstore# Run criterion benchmarks
cargo bench
# Specific benchmark
cargo bench --bench my_benchmark- Issues: Check existing issues
- Discussions: Ask questions in GitHub Discussions
- Documentation: See DEVELOPER_GUIDE.md for detailed info
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Help others learn
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Credited in documentation
Thank you for making VecStore better! 🎉
For detailed development information, see DEVELOPER_GUIDE.md