Skip to content
Open-Source npm Package

Edge Vector Store

On-device vector database. HNSW + SIMD + zero-copy JSI.

Production-grade vector similarity search on mobile devices — USearch-backed HNSW index, tiered hot/cold architecture, custom NEON batch kernels, and zero-copy Float32Array transfers. Sub-millisecond latency with no network dependency.

$ npm install react-native-edge-vector-store
Sub-millisecond search latency Zero network dependency Crash-safe binary WAL
What is Edge Vector Store?

Vector search that runs where your users are

react-native-edge-vector-store is a native C++ vector database for React Native that brings production-grade approximate nearest neighbor search to mobile devices. It combines a USearch-backed HNSW index, in-memory metadata with binary persistence, a tiered hot/cold architecture, and custom NEON batch kernels — all accessible through a clean TypeScript API with zero-copy Float32Array transfers via JSI.

Existing solutions either wrap SQLite (slow for vectors), require cloud APIs, or lack React Native support entirely. Edge Vector Store is purpose-built for mobile: it uses memory-mapped files for near-instant cold starts, a fixed-capacity in-RAM hot cache with LRU eviction, and optional 2-stage reranking that runs coarse quantized search followed by full float32 re-scoring.

The library supports four quantization levels — F32, F16, I8, and B1 — with I8 as the default for 4× memory savings. Search profiles let you trade off between speed, memory, and recall: balanced, memory_saver, max_recall, and max_speed. The portable .evs pack format bundles your index into a standard ZIP for offline distribution.

The result is a vector database that fits cleanly into offline-first architectures, on-device RAG systems, recommendation engines, and semantic search features — without cloud infrastructure, without SQLite overhead, and without leaving the device.

HNSW Index Engine

USearch-backed approximate nearest neighbor search with configurable connectivity, expansion factors, and four quantization levels.

Custom SIMD Kernels

Batch NEON kernels process 4 candidates simultaneously with the query vector pinned in registers. Fast paths for 128/256/384/512/768 dimensions.

Tiered Architecture

Hot in-RAM cache with LRU eviction + cold mmap'd index. TieredSearch merges results from both tiers with optional float32 reranking.

Why It Matters

Real performance for real mobile apps

Sub-Millisecond Latency

Hot cache returns results in under 1ms. The full tiered search with cold mmap'd index completes in under 0.6ms mean latency. No network round-trips, no cloud lookups.

Zero Network Dependency

All search happens on-device. Build your index once, search it indefinitely — no API keys, no cloud endpoints, no connectivity requirements after initial embedding.

Crash-Safe Persistence

A binary write-ahead log (journal.bin) protects against data loss. If the app crashes mid-write, the journal replays automatically on next init. Your data survives process death.

Tiny Binary Footprint

Adds only 300–700 KB to your binary on iOS and 1.5–2 MB on Android. No SQLite dependency, no heavyweight frameworks. Just USearch, miniz, and the C++ core.

Portable .evs Packs

Export your index as a ZIP-based .evs file containing the HNSW index, metadata, and manifest. Import it on any device or platform — pre-built knowledge bases ship with your app.

Production-Grade Benchmarks

100K vectors at 384 dimensions: 1,323 vec/s insert throughput, 0.587ms mean search latency, 0.834 recall@10. The built-in 5-phase benchmark harness validates performance on your hardware.

Who Should Use This

Built for teams shipping AI on mobile

React Native Developers

Drop in a native vector database with a clean TypeScript API. Zero-copy JSI bridge, TurboModule support, and full type declarations. Works with React Native 0.73+ and the New Architecture.

Mobile AI Engineers

Build RAG pipelines, semantic search, and recommendation features entirely on-device. Pair with ONNX Runtime or llama.rn for a complete edge AI stack.

ML Platform Teams

Deploy embedding-based features to mobile without provisioning vector database infrastructure. Pre-build .evs packs on your build server, ship them with the app binary.

CTOs & Engineering Leaders

Reduce cloud costs and latency by moving vector search to the edge. No Pinecone, no Weaviate, no managed vector database — just a native library in your app.

Startups Building AI Products

Ship semantic search and recommendation features without backend vector infrastructure. I8 quantization gives 4× memory savings. Start with max_speed profile, scale to max_recall when needed.

Offline-First Product Teams

Serve users in environments without reliable connectivity. The entire search pipeline runs locally — no fallback to cloud, no degraded experience offline.

Core Capabilities

What you can build with it

HNSW Nearest Neighbor Search

USearch-backed approximate nearest neighbor search with cosine, euclidean, and inner product distance metrics. Configurable connectivity (M), expansion factors, and hot cache capacity.

Tiered Hot/Cold Architecture

Fixed-capacity in-RAM hot cache with LRU eviction. Evicted vectors migrate to the cold mmap'd index. TieredSearch merges results from both tiers automatically.

Custom SIMD Batch Kernels

NEON batch distance computation processes 4 candidates simultaneously with the query vector pinned in registers. Dimension-aligned fast paths for common embedding sizes.

Four Search Profiles

balanced (hot + cold), memory_saver (cold only), max_recall (both + reranking), max_speed (hot only). Choose the right trade-off for each query type.

Crash-Safe Binary WAL

Append-only binary journal protects every write. If the process dies mid-operation, the journal replays on next init(). Zero data loss, zero corruption.

Portable .evs Pack Format

ZIP-based format bundles manifest.json, cold.usearch index, and metadata.db. Export from build server, import on device. Ship pre-built knowledge bases with your app.

Zero-Copy JSI Bridge

Float32Array vectors cross the JSI bridge with zero serialization overhead. No JSON encoding of large vector arrays. Direct memory access from JavaScript to C++.

Multi-Store Support

Multiple independent vector stores in a single app. The StoreRegistry maps storage paths to EdgeStore instances — isolate different embedding spaces or knowledge domains.

Use Cases

Where it works in the real world

From mobile RAG pipelines to recommendation engines, Edge Vector Store fits wherever on-device similarity search matters.

On-Device RAG

Embed, store, retrieve — entirely on mobile

Semantic Search

Natural language search over local document collections

Recommendation Engines

Content and product recommendations without cloud APIs

Image Similarity

CLIP embeddings for visual search on-device

Offline Knowledge Bases

Pre-built .evs packs for field workers and remote teams

Conversational AI

Context retrieval for on-device LLM chat assistants

Anomaly Detection

Real-time vector distance monitoring at the edge

Part of AppScale

How it fits into AppScale's approach

react-native-edge-vector-store reflects AppScale's philosophy of building production-ready infrastructure for mobile-first environments. We work with on-device AI, offline-first architectures, and high-performance native modules every day. This library came from that work.

AppScale builds for constrained environments — limited connectivity, edge devices, mobile-first users. Edge Vector Store is a direct expression of that philosophy: native C++ performance, zero cloud dependency, designed for apps where infrastructure assumptions don't hold.

Native C++ performance over JavaScript workarounds
On-device AI infrastructure for mobile teams
Zero cloud dependency as a core design principle
Production-grade benchmarks — not synthetic demos
Built for environments where network is optional
Developer Trust

Built by someone who ships

Architect-Built

Created by an engineer with hands-on experience across mobile platforms, native modules, and AI infrastructure — not a wrapper around SQLite, but a purpose-built vector database with HNSW, SIMD, and binary persistence.

Production-Minded Design

TypeScript throughout, comprehensive type declarations, semantic versioning, and a clean API surface. Crash-safe WAL, memory-mapped cold storage, and a 5-phase benchmark suite for validation.

Open Source, MIT Licensed

Fully open on GitHub. Inspect the C++ core, read the SIMD kernels, fork it, extend it. No black boxes. No vendor lock-in. 100% transparent.

Benchmarked, Not Just Claimed

Every performance claim is backed by the built-in benchmark harness. 100K vectors, 384 dimensions, real recall/latency/QPS numbers. Run the benchmarks on your own hardware.

FAQs

Common questions

It provides a production-grade on-device vector database for React Native. You insert documents with embeddings (Float32Array), and it stores them in a USearch-backed HNSW index with binary metadata persistence. You can then search for nearest neighbors using cosine, euclidean, or inner product distance — all on-device, with sub-millisecond latency.

Yes. The entire search pipeline runs on-device with zero network dependency. You need network access only if you're generating embeddings via a cloud API (like OpenAI), but once vectors are stored locally, all search and retrieval is fully offline. You can also pre-build .evs packs and ship them with your app.

SQLite-based solutions store vectors as BLOBs and do brute-force or limited ANN search. Edge Vector Store uses a purpose-built HNSW index (via USearch) with custom SIMD kernels, a tiered hot/cold architecture, and zero-copy JSI transfers. The result is sub-millisecond search latency vs. tens of milliseconds with SQLite approaches.

Four levels: F32 (full precision), F16 (half precision), I8 (4× memory savings, default), and B1 (binary, 32× savings). I8 gives the best balance of recall and memory. Use max_recall profile with I8 for 2-stage reranking — coarse quantized search followed by full float32 re-scoring.

React Native 0.73 and above with the New Architecture (TurboModules). The library uses JSI for zero-copy vector transfers and a TurboModule as a fallback JSON bridge. iOS 13.0+ and Android minSdk 24.

300–700 KB on iOS and 1.5–2 MB on Android. The bulk is the compiled USearch library. There's no SQLite dependency, no heavyweight frameworks — just the C++ core, USearch, and miniz for .evs pack I/O.

Yes. Use exportPack() to create a .evs file containing the HNSW index, metadata, and manifest. Ship the .evs file as an app asset, then call importPack() on first launch. Users get instant search with no indexing delay.

On a 100K vector dataset (384 dimensions, cosine): 1,323 vec/s insert throughput, 0.587ms mean search latency, 0.851ms P99 latency, 0.834 recall@10, 0.84ms cold start via mmap. The built-in 5-phase benchmark harness lets you validate on your own hardware.

Yes. The StoreRegistry manages multiple independent EdgeStore instances, each with its own storage path, dimensions, and configuration. Use separate stores for different embedding spaces, knowledge domains, or user-specific data.

When your users don't have reliable internet. When you need sub-millisecond latency without network round-trips. When embeddings are sensitive and shouldn't leave the device. When you want to eliminate cloud vector database costs. When you're building for mobile-first, offline-first, or edge environments. If you always have reliable connectivity and need to search billions of vectors, a cloud solution may be more appropriate.

Get Started

Try react-native-edge-vector-store

Install from npm. Initialize a store. Search vectors on-device. No cloud database, no API keys, no infrastructure setup.