Replies: 2 comments
-
Thanks, will sure test it! :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Welcome to Annie! Here you'll find answers to common and advanced questions about installing, using, and contributing to Annie — the Rust-powered k-NN library for Python.
If your question isn’t here, open a Discussion or email maxprogrammer007 or arnavk23. We love to help!
Table of Contents
About Annie
What is Annie?
A Rust-powered brute-force k-NN index with Python bindings — designed to be:
Why the name "Annie"?
From “Approximate Nearest Neighbor Index.” Even though Annie is currently exact brute-force, we kept the name for its simplicity and to reflect planned ANN backends.
How is Annie different from FAISS, Annoy, etc.?
Installation & Setup
How do I install?
Do I need Rust?
No — if installing from PyPI.
Yes — if building from source:
git clone https://github.com/Programmers-Paradise/Annie cd Annie pip install maturin maturin develop --release
Which Python versions?
Python 3.8–3.12 (tested in CI).
Using Annie
How do I create an index?
How do I add data?
Search for nearest neighbors:
Batch search:
Supported distances:
Save & load:
Thread safety:
Use: from rust_annie import ThreadSafeAnnIndex
This wrapper releases the Python GIL.
Advanced Usage & Development
Does Annie use SIMD?
Yes, SIMD accelerates dot products & norms.
Parallelism?
Yes, via Rust’s Rayon.
Exact or approximate?
Exact brute-force now; ANN (HNSW/FAISS) planned.
Data shape & dtype:
Vectors: float32 NumPy array, shape (N, dim)
IDs: int64 NumPy array, shape (N,)
Contributing
How to help?
Tests:
cargo test # Rust tests
pytest # Python tests
Troubleshooting
ImportError?
Use pip install rust-annie
Confirm Python ≥ 3.8
pip install maturin & maturin develop if building locally
Build errors on Windows?
Install Visual Studio Build Tools
Update Rust toolchain: rustup update
“Search is slow”
Batch queries help
Overhead dominates for very small N (<1k)
Contact & Community
If you find Annie useful, star ⭐ the repo and join us in building the fastest Rust+Python k-NN!!
Beta Was this translation helpful? Give feedback.
All reactions