faiss-rs
Library Listed
High-level bindings for Faiss, the vector similarity search engine
- Downloads
- 19,449
- Dependents
- 5
- Stars
- 250
- Forks
- 51
- Contributors
- 11
- Commits
- 355
- Latest release
- 0.13.0 ·
About
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
Follow the instructions to build Faiss using CMake, enabling the variables
FAISS_ENABLE_C_APIandBUILD_SHARED_LIBS. The crate is currently only compatible with version v1.7.2. Consider building Faiss from this fork,c_api_headbranch, 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 buildThis 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 theLD_LIBRARY_PATHenvironment 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 optionFAISS_ENABLE_GPU. Note:faiss_cmight link dynamically to the nativefaisslibrary, which in that case you will need to install the main shared object (faiss/libfaiss.so) as well.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
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.
Compatibility
- 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.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
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 - 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 | |
|
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 daysdormancy: last activity 2025-11-15, 359 days ago, E = 365: activefeatured: 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
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
Adoption5 active dependents, 5 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 5 | crates.io database dump | Yes | |
| New dependents (365 days) | 5 | crates.io database dump | Yes | |
| Peak active dependents | 5 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | 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-15 | GitHub repository | Yes | |
| Latest release | 2025-11-15 | crates.io database dump | Yes | |
| First release | 2018-01-29 | crates.io database dump | Yes | |
| Latest version | 0.13.0 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 903 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 4 | GitHub repository | Yes | |
| Repository archived | false | 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 |
Distribution14 releases, 19,449 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 14 | crates.io database dump | Yes | |
| Downloads over 30 days | 19449 | 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 |
Repository250 stars, 51 forks, 11 contributors, 355 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 250 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 51 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 11 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 355 | 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 | Apache-2.0 OR 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 | Binds native code: faiss-sys, faiss_c. Build uses a native toolchain: cmake (feature static) | 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 | 5 | 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.