ZeroVector.Core 1.0.0

dotnet add package ZeroVector.Core --version 1.0.0
                    
NuGet\Install-Package ZeroVector.Core -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZeroVector.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroVector.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ZeroVector.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZeroVector.Core --version 1.0.0
                    
#r "nuget: ZeroVector.Core, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZeroVector.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZeroVector.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ZeroVector.Core&version=1.0.0
                    
Install as a Cake Tool

๐Ÿ“ ZeroVector: Sovereign Embedded Vector Database & SIMD Similarity Engine

License: MIT .NET Multi-Targeting Zero External Dependencies

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).
  • Zero External Dependencies & Multi-Targeting:
    • Pure C# implementation compatible with .NET 8.0+, .NET Framework 4.6.2+, and .NET Standard 2.0.

๐Ÿš€ Quick Start

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}");
}
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), and ZeroPipeline (L5).
  • Downstream dependencies: ZeroPrimitives (L0) and pure .NET primitives.

๐Ÿ“„ License

Architected and developed by Phong Vรต (kzxl). Released under the MIT License.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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