faiss-rs

Library Listed

High-level bindings for Faiss, the vector similarity search engine

Checked · Sources

Downloads
19,449
Dependents
5
Stars
250
Forks
51
Contributors
11
Commits
355
Latest release
0.13.0 ·

About

From the project README ·

This project provides Rust bindings to Faiss, the state-of-the-art vector search and clustering library.

Installing with dynamic linking

By default, this crate is dynamically linked with the Faiss library installed in your system, so it does not build Faiss automatically for you. To build the library yourself:

Read the full README
  1. Follow the instructions to build Faiss using CMake, enabling the variables FAISS_ENABLE_C_API and BUILD_SHARED_LIBS. The crate is currently only compatible with version v1.7.2. Consider building Faiss from this fork, c_api_head branch, which will contain the latest supported bindings to the C interface. For example:

    cmake -B build -DFAISS_ENABLE_C_API=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
    cmake --build build
    

    This will result in the dynamic library faiss_c ("c_api/libfaiss_c.so" on Linux), which needs to be installed in a place where your system will pick up (in Linux, try somewhere in the LD_LIBRARY_PATH environment variable, such as "/usr/lib", or try adding a new path to this variable. For mac users, this means placing it in /usr/local/lib/libfaiss_c.dylib). For GPU support, don't forget to enable the option FAISS_ENABLE_GPU. Note: faiss_c might link dynamically to the native faiss library, which in that case you will need to install the main shared object (faiss/libfaiss.so) as well.

  2. You are now ready to include this crate as a dependency:

    [dependencies]
    "faiss" = "0.13.0"
    

If you have built Faiss with GPU support, you can include the "gpu" Cargo feature:

[dependencies]
"faiss" = { version = "0.13.0", features = ["gpu"] }

Installing with static linking

Alternatively to the above, enable the "static" Cargo feature to let Rust build Faiss for you. You will still need the dependencies required to build and run Faiss as described in their INSTALL.md, namely a compatible C++ compiler and a BLAS implementation.

[dependencies]
"faiss" = { version = "0.13.0", features = ["static"] }

Compiling Faiss with GPU support is also possible.

[dependencies]
"faiss" = { version = "0.13.0", features = ["static", "gpu"] }

Using

A basic example is seen below. Please check out the documentation for more.

use faiss::{Index, index_factory, MetricType};

let mut index = index_factory(64, "Flat", MetricType::L2)?;
index.add(&my_data)?;

let result = index.search(&my_query, 5)?;
for (i, (l, d)) in result.labels.iter()
    .zip(result.distances.iter())
    .enumerate()
{
    println!("#{}: {} (D={})", i + 1, *l, *d);
}

License and attribution notice

Licensed under either of

at your option.

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.

This work is not affiliated with Facebook AI Research or the main Faiss software.

Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
Required
  • Binds native code: faiss-sys, faiss_c
  • Build uses a native toolchain: cmake (feature static)
Python bindings
No Python binding crate found
License
Apache-2.0 OR 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.

faiss-rs beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
faiss-rs This page 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
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 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
pgvectorscale App Listed

Postgres extension for vector search (DiskANN), complements pgvector for performance and scale. Postgres OSS licensed.

33,328 binary downloads per release Not applicable 3,161 Not measured Not measured PostgreSQL
regexr Listed

A high-performance regex engine built from scratch with JIT compilation and SIMD acceleration

8,809 downloads over 30 days 4 28 0.6.2 GPU support unknown No native code found Apache-2.0 OR 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
next-plaid Listed

CPU-based PLAID implementation for multi-vector search using ndarray

Python bindings

256 downloads over 30 days 1 610 1.8.5 CUDA Binds native code: tree-sitter, libsqlite3-sys, ort-sys, tree-sitter-language, zstd-sys and 4 more Apache-2.0
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

  • It has 5 active dependents and 5 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 250 stars, 51 forks and 11 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.

What else the check found

  • The last activity is on 15 Nov 2025, 359 days ago. The rules expect an update within 365 days. Dormancy rule

Exact rules: Listed, Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.13.0 base 140, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2025-11-15, 359 days ago, E = 365: active
  • featured: not featured: active_users 5 < 11 and new_adopters 5 < 9 and repository route stars 250 (needs 4539), forks 51 (needs 434), contributors 11 (needs 79)
  • listed: listed: no archive, new or featured rule applies
Crates2 crates

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
Adoption5 active dependents, 5 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents5crates.io database dumpYes
New dependents (365 days)5crates.io database dumpYes
Peak active dependents5crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 11 months ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2025-11-15GitHub repositoryYes
Latest release2025-11-15crates.io database dumpYes
First release2018-01-29crates.io database dumpYes
Latest version0.13.0crates.io database dumpYes
Days the oldest outside issue waits for a reply903GitHub repositoryYes
Maintainer replies over 365 days4GitHub repositoryYes
Repository archivedfalseGitHub 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
Distribution14 releases, 19,449 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases14crates.io database dumpYes
Downloads over 30 days19449crates.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
Repository250 stars, 51 forks, 11 contributors, 355 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars250GitHub repositoryYes — one part of the repository route
GitHub forks51GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account11GitHub contributorsYes — one part of the repository route
Commits on the default branch355GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0 OR MITcrates.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 dependenciesBinds native code: faiss-sys, faiss_c. Build uses a native toolchain: cmake (feature static)crates.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 directly5crates.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.