chromadb-rs

Library Archived

A Rust client library for the ChromaDB vector database.

Checked ยท Sources

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

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

From the project README ยท

[!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 logo

OpenSauced provides insights into open source projects by using data science in git commits.

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.

chromadb-rs beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
chromadb-rs This page Archived

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 App Featured

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
Adoption3 active dependents, 3 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents3crates.io database dumpYes
New dependents (365 days)3crates.io database dumpYes
Peak active dependents5crates.io database dumpYes
Active dependents as a share of the peak0.975crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 11 months ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2025-11-25GitHub repositoryYes
Latest release2025-06-28crates.io database dumpYes
First release2023-08-02crates.io database dumpYes
Latest version2.3.0crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days3GitHub repositoryYes
Repository archivedtrueGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution34 releases, 3,548 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases34crates.io database dumpYes
Downloads over 30 days3548crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository46 stars, 18 forks, 10 contributors, 77 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars46GitHub repositoryYes โ€” one part of the repository route
GitHub forks18GitHub repositoryYes โ€” one part of the repository route
Contributors with a GitHub account10GitHub contributorsYes โ€” one part of the repository route
Commits on the default branch77GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseMITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesNo native code foundcrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly7crates.io database dumpNo

Corrections and review history

Report a correction

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.