chromadb-rs
Library Archived
A Rust client library for the ChromaDB vector database.
- Downloads
- 3,548
- Dependents
- 7
- Stars
- 46
- Forks
- 18
- Contributors
- 10
- Commits
- 77
- Latest release
- 2.3.0 ยท
Why Archived
GitHub reports the repository as archived.
Check notes
- the latest release was packaged from a dirty working tree
Exact rules: Instant archive. The check on applied thresholds version 9.
Every rule outcome, as the check records it
instant-archive: repository is archived
About
[!IMPORTANT] This project has been archived. Please use to the official Chroma Rust client.
A Rust client library for the Chroma vector database.
๐พ Installing the library
cargo add chromadb
๐ Documentation
The library reference can be found here.
๐ Overview
The library provides 2 modules to interact with the ChromaDB server via API V1
client- To interface with the ChromaDB server.collection- To interface with an associated ChromaDB collection.
You can connect to ChromaDB by instantiating a ChromaClient
use chromadb::client::{ChromaAuthMethod, ChromaClient, ChromaClientOptions, ChromaTokenHeader};
use chromadb::collection::{ChromaCollection, GetOptions, GetResult, CollectionEntries};
// With default ChromaClientOptions
// Defaults to http://localhost:8000
let client: ChromaClient = ChromaClient::new(Default::default());
// With custom ChromaClientOptions
let auth = ChromaAuthMethod::TokenAuth {
token: "<TOKEN>".to_string(),
header: ChromaTokenHeader::Authorization
};
let client: ChromaClient = ChromaClient::new(ChromaClientOptions {
url: Some("<CHROMADB_URL>".into()),
database: "<DATABASE>".into(),
auth
});
Read the full README
Now that a client is instantiated, we can interface with the ChromaDB server
use serde_json::json;
// Get or create a collection with the given name and no metadata.
let collection: ChromaCollection = client.get_or_create_collection("my_collection", None).await?;
// Get the UUID of the collection
let collection_uuid = collection.id();
println!("Collection UUID: {}", collection_uuid);
With a collection instance, we can perform queries on the database
// Upsert some embeddings with documents and no metadata.
let collection_entries = CollectionEntries {
ids: vec!["demo-id-1".into(), "demo-id-2".into()],
embeddings: Some(vec![vec![0.0_f32; 768], vec![0.0_f32; 768]]),
metadatas: None,
documents: Some(vec![
"Some document about 9 octopus recipies".into(),
"Some other document about DCEU Superman Vs CW Superman".into()
])
};
let result: bool = collection.upsert(collection_entries, None).await?;
// Create a filter object to filter by document content.
let where_document = json!({
"$contains": "Superman"
});
// Get embeddings from a collection with filters and limit set to 1.
// An empty IDs vec will return all embeddings.
let get_query = GetOptions {
ids: vec![],
where_metadata: None,
limit: Some(1),
offset: None,
where_document: Some(where_document),
include: Some(vec!["documents".into(),"embeddings".into()])
};
let get_result: GetResult = collection.get(get_query).await?;
println!("Get result: {:?}", get_result);
Find more information about the available filters and options in the get() documentation.
Performing a similarity search
//Instantiate QueryOptions to perform a similarity search on the collection
//Alternatively, an embedding_function can also be provided with query_texts to perform the search
let query = QueryOptions {
query_texts: None,
query_embeddings: Some(vec![vec![0.0_f32; 768], vec![0.0_f32; 768]]),
where_metadata: None,
where_document: None,
n_results: Some(5),
include: None,
};
let query_result: QueryResult = collection.query(query, None).await?;
println!("Query result: {:?}", query_result);
Support for Embedding providers
This crate has built-in support for OpenAI and SBERT embeddings.
To use OpenAI embeddings, enable the openai feature in your Cargo.toml.
let collection: ChromaCollection = client.get_or_create_collection("openai_collection", None).await?;
let collection_entries = CollectionEntries {
ids: vec!["demo-id-1", "demo-id-2"],
embeddings: None,
metadatas: None,
documents: Some(vec![
"Some document about 9 octopus recipies",
"Some other document about DCEU Superman Vs CW Superman"])
};
// Use OpenAI embeddings
let openai_embeddings = OpenAIEmbeddings::new(Default::default());
collection.upsert(collection_entries, Some(Box::new(openai_embeddings))).await?;
Sponsors
OpenSauced provides insights into open source projects by using data science in git commits.
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- None found
- No native code found
- Python bindings
- No Python binding crate found
- License
- MIT
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 Rust client library for the ChromaDB vector database. |
3,548 downloads over 30 days | 7 | 46 | 2.3.0 | GPU support unknown | No native code found | MIT |
|
lancedb Featured
LanceDB: A serverless, low-latency vector database for AI applications |
615,090 downloads over 30 days | 102 | 11,863 | 0.41.0 | GPU support unknown | No native code found | Apache-2.0 |
|
surrealdb Featured
A scalable, distributed, collaborative, document-graph database, for the realtime web |
197,581 downloads over 30 days | 162 | 33,296 | 4.0.0 | GPU support unknown | Binds native code: ring, openssl-sys (feature native-tls) | Not measured |
|
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 |
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.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption3 active dependents, 3 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 3 | crates.io database dump | Yes | |
| New dependents (365 days) | 3 | crates.io database dump | Yes | |
| Peak active dependents | 5 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 0.975 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 11 months ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2025-11-25 | GitHub repository | Yes | |
| Latest release | 2025-06-28 | crates.io database dump | Yes | |
| First release | 2023-08-02 | crates.io database dump | Yes | |
| Latest version | 2.3.0 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 3 | GitHub repository | Yes | |
| Repository archived | true | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution34 releases, 3,548 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 34 | crates.io database dump | Yes | |
| Downloads over 30 days | 3548 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | 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 | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository46 stars, 18 forks, 10 contributors, 77 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 46 | GitHub repository | Yes โ one part of the repository route | |
| GitHub forks | 18 | GitHub repository | Yes โ one part of the repository route | |
| Contributors with a GitHub account | 10 | GitHub contributors | Yes โ one part of the repository route | |
| Commits on the default branch | 77 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | No native code found | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 7 | crates.io database dump | 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.
