
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
@ruvector/core
Advanced tools
High-performance Rust vector database for Node.js with HNSW indexing and SIMD optimizations
High-performance Rust vector database for Node.js with HNSW indexing and SIMD optimizations.
npm install @ruvector/core
The package will automatically install the correct native binding for your platform:
import { VectorDB, DistanceMetric } from '@ruvector/core';
// Create a database
const db = new VectorDB({
dimensions: 384,
distanceMetric: DistanceMetric.Cosine,
storagePath: './vectors.db',
hnswConfig: {
m: 32,
efConstruction: 200,
efSearch: 100
}
});
// Insert vectors
const id = await db.insert({
vector: new Float32Array([1.0, 2.0, 3.0, ...])
});
// Search for similar vectors
const results = await db.search({
vector: new Float32Array([1.0, 2.0, 3.0, ...]),
k: 10
});
console.log(results);
// [{ id: 'vector-id', score: 0.95 }, ...]
new VectorDB(options: DbOptions)
Creates a new vector database with the specified options.
Options:
dimensions (number, required): Vector dimensionsdistanceMetric (DistanceMetric, optional): Distance metric (default: Cosine)storagePath (string, optional): Path for persistent storage (default: './ruvector.db')hnswConfig (HnswConfig, optional): HNSW index configurationquantization (QuantizationConfig, optional): Quantization configurationVectorDB.withDimensions(dimensions: number): VectorDB
Creates a vector database with default options.
Inserts a vector into the database.
const id = await db.insert({
id: 'optional-id',
vector: new Float32Array([1, 2, 3])
});
Inserts multiple vectors in a batch.
const ids = await db.insertBatch([
{ vector: new Float32Array([1, 2, 3]) },
{ vector: new Float32Array([4, 5, 6]) }
]);
Searches for similar vectors.
const results = await db.search({
vector: new Float32Array([1, 2, 3]),
k: 10,
efSearch: 100
});
Deletes a vector by ID.
const deleted = await db.delete('vector-id');
Retrieves a vector by ID.
const entry = await db.get('vector-id');
Returns the number of vectors in the database.
const count = await db.len();
Checks if the database is empty.
const empty = await db.isEmpty();
enum DistanceMetric {
Euclidean = 'Euclidean',
Cosine = 'Cosine',
DotProduct = 'DotProduct',
Manhattan = 'Manhattan'
}
interface DbOptions {
dimensions: number;
distanceMetric?: DistanceMetric;
storagePath?: string;
hnswConfig?: HnswConfig;
quantization?: QuantizationConfig;
}
interface HnswConfig {
m?: number;
efConstruction?: number;
efSearch?: number;
maxElements?: number;
}
interface QuantizationConfig {
type: 'none' | 'scalar' | 'product' | 'binary';
subspaces?: number;
k?: number;
}
rUvector delivers exceptional performance:
| Platform | Architecture | Package |
|---|---|---|
| Linux | x64 | @ruvector/core-linux-x64-gnu |
| Linux | ARM64 | @ruvector/core-linux-arm64-gnu |
| macOS | x64 (Intel) | @ruvector/core-darwin-x64 |
| macOS | ARM64 (Apple Silicon) | @ruvector/core-darwin-arm64 |
| Windows | x64 | @ruvector/core-win32-x64-msvc |
MIT
FAQs
High-performance vector database with HNSW indexing - 50k+ inserts/sec, built in Rust for AI/ML similarity search and semantic search applications
The npm package @ruvector/core receives a total of 37,236 weekly downloads. As such, @ruvector/core popularity was classified as popular.
We found that @ruvector/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.