voy
App Listed Dormant
πΈοΈπ¦ A WASM vector similarity search written in Rust
- Downloads
- Not measured
- Dependents
- Not applicable
- Stars
- 1,076
- Forks
- 39
- Contributors
- 2
- Commits
- 88
About
A WASM vector similarity search engine written in Rust

- Tiny: 75KB gzipped, 69KB brotli.
- Fast: Create the best search experience for the users. Voy uses k-d tree to index and provide fast search
- Tree Shakable: Optimize bundle size and enable asynchronous capabilities for modern Web API, such as Web Workers.
- Resumable: Generate portable embeddings index anywhere, anytime.
- Worldwide: Designed to deploy and run on CDN edge servers.
π Work in Progress
Voy is under active development. As a result, the API is not stable. Please be aware that there might be breaking changes before the upcoming 1.0 release.
A sneak peek of what we are working on:
- [ ] Built-in text transformation in WebAssembly: As of now, voy relies on JavaScript libraries like
transformers.jsto generate text embeddings. See Usage for more detail.- [x] Index update: Currently it's required to re-build the index when a resource update occurs.
- [x] TypeScript support: Due to the limitation of WASM tooling, complex data types are not auto-generated.
Installation
# with npm
npm i voy-search
# with Yarn
yarn add voy-search
# with pnpm
pnpm add voy-search
Read the full README
APIs
class Voy
The Voy class encapsulates an index and exposes all the public methods Voy has to offer.
class Voy {
/**
* By instantiating with a resource, Voy will construct the index. If the resource is
* absent, it will construct an empty index. Calling Voy.index() later on will override
* the empty index.
* @param {Resource | undefined} resource
*/
constructor(resource?: Resource);
/**
* Index given resource. Voy.index() is designed for the use case where a Voy instance
* is instantiated without a resource. It will override the existing index. If you'd like
* to keep the existing index, you can use Voy.add() to add your resource to the index.
* @param {Resource} resource
*/
index(resource: Resource): void;
/**
* Search top k results with given query embedding.
* @param {Float32Array} query: Query Embedding
* @param {number} k: Number of items in the search result
* @returns {SearchResult}
*/
search(query: Float32Array, k: number): SearchResult;
/**
* Add given resource to the index.
* @param {Resource} resource
*/
add(resource: Resource): void;
/**
* Remove given resource from the index.
* @param {Resource} resource
*/
remove(resource: Resource): void;
/**
* Remove all resources from the index.
*/
clear(): void;
/**
* @returns {number}
*/
size(): number;
/**
* Serialize a Voy instance.
* @returns {string}
*/
serialize(): string;
/**
* Deserialize a serialized index into a Voy instance.
* @param {string} serialized_index
* @returns {Voy}
*/
static deserialize(serialized_index: string): Voy;
}
interface Resource {
embeddings: Array<{
id: string; // id of the resource
title: string; // title of the resource
url: string; // url to the resource
embeddings: number[]; // embeddings of the resource
}>;
}
interface SearchResult {
neighbors: Array<{
id: string; // id of the resource
title: string; // title of the resource
url: string; // url to the resource
}>;
}
Individual Functions
Besides the Voy class, Voy also exports all the instance methods as individual functions.
index(resource: Resource): SerializedIndex
It indexes the given resource and returns a serialized index.
Parameters
interface Resource {
embeddings: Array<{
id: string; // id of the resource
title: string; // title of the resource
url: string; // url to the resource
embeddings: number[]; // embeddings of the resource
}>;
}
Return
type SerializedIndex = string;
search(index: SerializedIndex, query: Query, k: NumberOfResult): SearchResult
It deserializes the given index and search for the k nearest neighbors of the query.
Parameter
type SerializedIndex = string;
type Query = Float32Array; // embeddings of the search query
type NumberOfResult = number; // K top results to return
Return
interface SearchResult {
neighbors: Array<{
id: string; // id of the resource
title: string; // title of the resource
url: string; // url to the resource
}>;
}
add(index: SerializedIndex, resource: Resource): SerializedIndex
It adds resources to the index and returns an updated serialized index.
Parameter
type SerializedIndex = string;
interface Resource {
embeddings: Array<{
id: string; // id of the resource
title: string; // title of the resource
url: string; // url to the resource
embeddings: number[]; // embeddings of the resource
}>;
}
Return
type SerializedIndex = string;
remove(index: SerializedIndex, resource: Resource): SerializedIndex
It removes resources from the index and returns an updated serialized index.
Parameter
type SerializedIndex = string;
interface Resource {
embeddings: Array<{
id: string; // id of the resource
title: string; // title of the resource
url: string; // url to the resource
embeddings: number[]; // embeddings of the resource
}>;
}
Return
type SerializedIndex = string;
clear(index: SerializedIndex): SerializedIndex
It removes all items from the index and returns an empty serialized index.
Parameter
type SerializedIndex = string;
Return
type SerializedIndex = string;
size(index: SerializedIndex): number;
It returns the size of the index.
Parameter
type SerializedIndex = string;
Usage
With Transformers
As of now, voy relies on libraries like transformers.js and web-ai to generate embeddings for text:
import { TextModel } from "@visheratin/web-ai";
const { Voy } = await import("voy-search");
const phrases = [
"That is a very happy Person",
"That is a Happy Dog",
"Today is a sunny day",
];
const query = "That is a happy person";
// Create text embeddings
const model = await (await TextModel.create("gtr-t5-quant")).model;
const processed = await Promise.all(phrases.map((q) => model.process(q)));
// Index embeddings with voy
const data = processed.map(({ result }, i) => ({
id: String(i),
title: phrases[i],
url: `/path/${i}`,
embeddings: result,
}));
const resource = { embeddings: data };
const index = new Voy(resource);
// Perform similarity search for a query embeddings
const q = await model.process(query);
const result = index.search(q.result, 1);
// Display search result
result.neighbors.forEach((result) =>
console.log(`β¨ voy similarity search result: "${result.title}"`)
);
Multiple Indexes
import { TextModel } from "@visheratin/web-ai";
const { Voy } = await import("voy-search");
const phrases = [
"That is a very happy Person",
"That is a Happy Dog",
"Today is a sunny day",
"Sun flowers are blooming",
];
const model = await (await TextModel.create("gtr-t5-quant")).model;
const processed = await Promise.all(phrases.map((q) => model.process(q)));
const data = processed.map(({ result }, i) => ({
id: String(i),
title: phrases[i],
url: `/path/${i}`,
embeddings: result,
}));
const resourceA = { embeddings: data.slice(0, 2) };
const resourceB = { embeddings: data.slice(2) };
const indexA = new Voy(resourceA);
const indexB = new Voy(resourceB);
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Sponsor
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Compatibility
- License
- Apache-2.0
- Crate facts
- Not measured
- Runs on, Native code and Python bindings read crates on crates.io. This entry lists no crate.
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
πΈοΈπ¦ A WASM vector similarity search written in Rust |
Not measured | Not applicable | 1,076 | Not measured | Not measured | Not measured | Apache-2.0 |
|
usearch Featured
Smaller & Faster Single-File Vector Search Engine from Unum |
242,089 downloads over 30 days | 70 | 4,373 | 2.26.6 | GPU support unknown | Binds native code: cxx, link-cplusplus, numkong (feature numkong). Build uses a native toolchain: cxx-build | Apache-2.0 |
|
Qdrant - High-performance, massive-scale Vector Database and Vector Search Engine for the next generation of AI. Also available in the cloud https://cloud.qdrant.io/ |
34,017 binary downloads per release | Not applicable | 35,478 | Not measured | Not measured | Apache-2.0 | |
|
ruvector Listed
High-performance Rust vector database core with HNSW indexing |
39,411 downloads over 30 days | 51 | 4,675 | 2.5.0 | CUDA, WebGPU, Metal | Binds native code: libsqlite3-sys, napi-sys, ort-sys, pgrx-pg-sys, pqcrypto-internals and 5 more | MIT |
|
faiss-rs Listed
High-level bindings for Faiss, the vector similarity search engine |
19,449 downloads over 30 days | 5 | 250 | 0.13.0 | GPU support unknown | Binds native code: faiss-sys, faiss_c. Build uses a native toolchain: cmake (feature static) | Apache-2.0 OR MIT |
|
splintr Listed
Tokenizer for Rust and Python: pure Rust by default, with 18 bundled vocabularies and four backends covering BPE, SentencePiece and WordPiece. Its output matches Hugging Face tokenizers id for id on 14 model families, including GPT-2, Qwen, Whisper, T5 and BERT. Python bindings |
8,204 downloads over 30 days | 7 | 63 | 0.22.2 | GPU support unknown | Binds native code: pcre2-sys (feature pcre2) | MIT |
|
velesdb Listed
High-performance vector database engine written in Rust |
2,396 downloads over 30 days | 0 | 102 | 8.1.0 | WebGPU | Binds native code: tauri, tauri-plugin-velesdb, atk-sys, gdk-pixbuf-sys, gdk-sys and 9 more | Not measured |
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- The project is dormant and not finished. Dormancy rule
What else the check found
- The last activity is on 20 Sep 2023, 1146 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule
- The oldest outside issue waits 1340 days for a reply, past the limit of 270. No maintainer replied in 365 days. Rot signals rule
Not measured: Latest release, Unpatched vulnerabilities past the grace window, First release.
Exact rules: Listed, Featured app. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: app: E = 365 daysdormancy: last activity 2023-09-20, 1146 days ago, E = 365: dormantrot: oldest unanswered issue 1340 days (limit 270), no maintainer reply in 365 daysfeatured: not featured: dormant and not stablelisted: listed: no archive, new or featured rule applies
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources4 sources
- Description: the GitHub repository description
- GitHub repository, fetched
- GitHub releases, fetched
- GitHub contributors, fetched
AdoptionNot measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | Not measured | Yes | ||
| New dependents (365 days) | Not measured | Yes | ||
| Peak active dependents | Not measured | Yes | ||
| Active dependents as a share of the peak | Not measured | Yes | ||
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 3 years ago8 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2023-09-20 | GitHub repository | Yes | |
| Latest release | Not measured | Yes | ||
| First release | Not measured | Yes | ||
| Latest version | Not measured | Yes | ||
| Days the oldest outside issue waits for a reply | 1340 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | Not measured | Yes | ||
| Published docs | Not measured | Yes | ||
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityNot measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | Not measured | Yes | ||
| RustSec unmaintained advisory | Not measured | Yes | ||
| Deprecation notice | Not measured | Yes | ||
| Deprecated requirement | Not measured | Yes |
Distribution0 binary downloads over the last 3 releases10 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | Not measured | Yes | ||
| Downloads over 30 days | Not measured | Yes | ||
| Binary downloads over the last 3 releases | 0 | GitHub releases | Yes | |
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | Not measured | Yes | ||
| Every version 0.0.x | Not measured | Yes | ||
| Every version yanked | Not measured | Yes | ||
| Crate deleted from crates.io | Not measured | Yes |
Repository1,076 stars, 39 forks, 2 contributors, 88 commits. Stars alone never qualify a project.1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 1076 | GitHub repository | Yes β one part of the repository route | |
| GitHub forks | 39 | GitHub repository | Yes β one part of the repository route | |
| Contributors with a GitHub account | 2 | GitHub contributors | Yes β one part of the repository route | |
| Commits on the default branch | 88 | GitHub repository | No | |
| Repository's main crate left out of the entry | Not measured | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 | GitHub repository | No | |
| Runs on, from listed crates and their direct dependencies | Not measured | No | ||
| What shows each backend | Not measured | No | ||
| Native code, from listed crates and their dependencies | Not measured | No | ||
| Python bindings, from direct dependencies of listed crates | Not measured | No | ||
| Crates that depend on a listed crate directly | Not measured | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.