
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@polymath-ai/db
Advanced tools
To use:
import { VectorStore } from "@polymath-ai/db";
// A directory where the database will reside.
// The store will create the directory and populate it with two files:
// - `database.db` -- the duckdb database that stores useful metadata.
// - `vector.idx` -- the hnswlib index that stores the vector index.
const path = "/path/to/store";
// The number of dimensions in the vector.
const dimensions = 1536;
const store = new VectorStore(path, dimensions);
To write bits into it:
const bits = ["array", "of", "bits"];
const writer = await store.createWriter();
await writer.write(bits);
To query:
const query = []; // the vector as an array of numbers
const resultCount = 5; // number of results to return
const reader = await store.createReader();
const results = await reader.search(query, resultCount);
FAQs
A simple database for embeddings
We found that @polymath-ai/db demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.