ZeroVector.Core
1.0.0
dotnet add package ZeroVector.Core --version 1.0.0
NuGet\Install-Package ZeroVector.Core -Version 1.0.0
<PackageReference Include="ZeroVector.Core" Version="1.0.0" />
<PackageVersion Include="ZeroVector.Core" Version="1.0.0" />
<PackageReference Include="ZeroVector.Core" />
paket add ZeroVector.Core --version 1.0.0
#r "nuget: ZeroVector.Core, 1.0.0"
#:package ZeroVector.Core@1.0.0
#addin nuget:?package=ZeroVector.Core&version=1.0.0
#tool nuget:?package=ZeroVector.Core&version=1.0.0
๐ ZeroVector: Sovereign Embedded Vector Database & SIMD Similarity Engine
ZeroVector is an ultra-high-throughput, zero-allocation embedded Vector Database and SIMD similarity metric engine engineered in 100% pure C# for .NET. It resides in Tier 2 (Transport & Storage) of the ZeroPlatform ecosystem.
โก Key Capabilities
- Hardware-Accelerated SIMD Metrics (AVX2 / FMA):
DotProduct: Simultaneous 8-wide float multiply-add evaluation.CosineSimilarity: Single-pass combined dot product and norm calculation ($\le 1.0$).EuclideanDistance&EuclideanDistanceSquared: L2 metric for spatial embeddings.ManhattanDistance: L1 metric for sparse features.HammingDistance: 64-bit hardware POPCNT for binary bitstrings (ORB/BRIEF).
- Vector Indices:
FlatVectorIndex: Contiguous memory, exact brute-force Top-K search with multi-core parallel partitioning for up to millions of embeddings.HnswVectorIndex: Hierarchical Navigable Small World (HNSW) graph index providing sub-millisecond $O(\log N)$ approximate nearest neighbor (ANN) search with configurable $M$, $efConstruction$, and $efSearch$.
- Storage & Persistence:
- Compact zero-overhead binary index serialization and deserialization (
VectorIndexFile).
- Compact zero-overhead binary index serialization and deserialization (
- Zero External Dependencies & Multi-Targeting:
- Pure C# implementation compatible with
.NET 8.0+,.NET Framework 4.6.2+, and.NET Standard 2.0.
- Pure C# implementation compatible with
๐ Quick Start
1. Flat Contiguous Index (Exact Search)
using ZeroVector.Core.Indices;
using ZeroVector.Core.Metrics;
// Initialize index for 384-dimensional embeddings
var index = new FlatVectorIndex(dimension: 384, initialCapacity: 1024);
// Add embeddings
ReadOnlySpan<float> embedding = stackalloc float[384];
// ... populate embedding ...
index.Add(id: 1, embedding);
// Query Top-K nearest neighbors via Cosine Similarity
ReadOnlySpan<float> query = stackalloc float[384];
VectorSearchResult[] results = index.SearchTopK(query, k: 5, VectorMetricType.Cosine);
foreach (var r in results)
{
Console.WriteLine($"Matched ID: {r.Id}, Similarity Score: {r.Score:F4}");
}
2. HNSW Graph Index (Fast Approximate Search)
using ZeroVector.Core.Indices;
using ZeroVector.Core.Metrics;
// Initialize HNSW index
var hnsw = new HnswVectorIndex(
dimension: 128,
m: 16,
efConstruction: 100,
efSearch: 50,
metric: VectorMetricType.Cosine
);
// Populate index
for (int i = 0; i < 10000; i++)
{
float[] vec = GenerateVector(128);
hnsw.Add(id: i, vec);
}
// Sub-millisecond ANN search
VectorSearchResult[] matches = hnsw.SearchTopK(queryVec, k: 10);
๐ Architectural Placement in ZeroPlatform
ZeroVector resides strictly within Tier 2 (Transport & Storage):
- Upstream consumers:
ZeroInference(L3),ZeroGraphics(L4),ZeroAgent(L5), andZeroPipeline(L5). - Downstream dependencies:
ZeroPrimitives(L0) and pure .NET primitives.
๐ License
Architected and developed by Phong Vรต (kzxl). Released under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroPrimitives.Core (>= 1.7.0)
-
.NETStandard 2.0
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- ZeroPrimitives.Core (>= 1.7.0)
-
net8.0
- ZeroPrimitives.Core (>= 1.7.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ZeroVector.Core:
| Package | Downloads |
|---|---|
|
ZeroAgent.Core
Pure C# enterprise-grade cognitive AI Agent runtime (ReAct loop, tool registry, episodic memory via ZeroVector, and multi-agent swarm) for .NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 0 | 9/30/2026 |