DiskANN
AGENTS.md2k starsChanged 13 days agoMITView on GitHub
Last Updated: 2026-10-29 (based on v0.61.0) DiskANN is a Rust implementation of scalable approximate nearest neighbor (ANN) search algorithms. The project is a rewrite from C++ to Rust. The repository uses a Cargo workspace with crates organized into functional tiers. See Cargo.toml for: - Workspace members and their dependencies - Shared dependency versions - Build profiles (release, test) - Workspace-level lints Tier 1: Foundation - diskann-wide/ - Low-level SIMD, bit manipulation, type width abstractions - diskann-vector/ - Vector primitives and…
Trending
Less talk lately.about the whole repository
Who's talking about microsoft/DiskANN
- A Hacker News story“SSD-Based Vector Indices”Hacker News · May 23, 2022 · 2 points
- surrealdb/surrealdb“Failed to build on rust nightly channel”GitHub · Sep 3, 2026 · 1 reactions
- @rusttrending.bsky.social“microsoft / DiskANN: Graph-structured Indices for Scalable, Fast, Fresh and Filtered Approximate Nearest …”Bluesky · Feb 12, 2026 · 1 likes
- atsentia/diskann-rust-arm64“Create a comprehensive DiskANN Rust parity report compared to original in C++, with exec summary and report …”GitHub · Aug 6, 2025 · 1 reactions
- atsentia/diskann-rust-arm64“Fill gaps between DiskAnn C++ Reference and this DiskANN Rust implementation, e.g. in particular disk …”GitHub · Aug 6, 2025 · 1 reactions
The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 52
Talked about on GitHub, Hacker News and Bluesky (52 times).
On GitHub · 50
- Sep 3, 2026Failed to build on rust nightly channel — surrealdb/surrealdb1 reaction
- Aug 6, 2025Create a comprehensive DiskANN Rust parity report compared to original in C++, with exec summary and report back — atsentia/diskann-rust-arm641 reaction
- Aug 6, 2025Fill gaps between DiskAnn C++ Reference and this DiskANN Rust implementation, e.g. in particular disk indexing support but more — atsentia/diskann-rust-arm641 reaction
- Aug 6, 2025Go even deeper on the diskann rust parity with the original in C++ — atsentia/diskann-rust-arm641 reaction
- Aug 6, 2025compare feature parity and (algorithmic) correctness between diskann in C++ (the original) and this version in rust. — atsentia/diskann-rust-arm641 reaction
45 more on GitHub
- Nov 3, 2026Fix illegal instructions — EnyuPan/diskann_spd0 reactions
- Oct 9, 2026feat(index): FreshDiskANN vector index with bounded memory — sourcenetwork/defradb.rs0 reactions · 3 comments
- Sep 14, 2026Move MinMax MaxSim SIMD primitives into diskann-wide — partychen/DiskANN0 reactions
- Sep 8, 2026vector-store: bump diskann version to 0.57.0 — scylladb/vector-store0 reactions · 3 comments
- Aug 13, 2026[PERF][search] Paged rebuild retains whole corpus and parallel slot vectors, exceeding 3 GiB — ChrisRoyse/Synapse0 reactions · 29 comments
- Jul 28, 2026Pipnn kernels — SeliMeli/DiskANN0 reactions
- Jul 20, 2026Pipnn — SeliMeli/DiskANN0 reactions
- Jul 18, 2026Add an AISAQ-style co-located SSD page layout to the DiskANN3 DataProvider — RyderFreeman4Logos/verbatim0 reactions · 1 comment
- Jul 18, 2026Adopt upstream DiskANN3 as the primary SSD-native VectorSearch backend — RyderFreeman4Logos/verbatim0 reactions · 1 comment
- Jul 18, 2026Epic: Make DiskANN3 the bounded-memory SSD-native vector retrieval architecture — RyderFreeman4Logos/verbatim0 reactions · 2 comments
- Jun 3, 2026[Add] DiskANN (microsoft/DiskANN) — PyTorchKR/landscape0 reactions · 2 comments
- May 25, 2026rebuttal fixes — SylviaZiyuZhang/cleanann-rust0 reactions
- May 6, 2026[WIP] [FEA] Example for Vamana Serialize + DiskANN Search — NVIDIA/cuvs0 reactions · 1 comment
- May 6, 2026feat(m0): DotVector 工程骨架 — 目录持久化 + 客户端/服务端架构分离 — IoTSharp/DotVector0 reactions
- May 6, 2026Add v4 distance kernels — m3hm3t/DiskANN0 reactions
- May 6, 2026Add v4 distance kernels (4-bit SquaredL2 / InnerProduct) — m3hm3t/DiskANN0 reactions
- Feb 24, 2026Dynamic concurrent benchmark — SylviaZiyuZhang/cleanann-rustsays it tested it0 reactions
- Jan 30, 2026[Ask for help] The exact version of DiskANN — karthik86248/BANG-Billion-Scale-ANN0 reactions
- Jan 7, 2026reconstruct id conversion — wuguoxing8/BFS-layout-for-diskann0 reactions
- Dec 12, 2025dec 2025 jan 2026 — kimtth/azure-openai-llm-notes0 reactions
- Nov 25, 2025HNSW 优化技术 — intellistream/sage-anns0 reactions
- Nov 5, 2025[FEA] Make Vamana Sector Aligned (SSD) Index Compatible With diskannpy. — NVIDIA/cuvs0 reactions · 1 comment
- Nov 5, 2025Amey singlepassclustering — yemaedahrav/DiskANN0 reactions
- Aug 14, 2025saved results to csv — owel14/DiskANN0 reactions
- May 8, 2025design 2 layered graph, first search in the grid graph, using the res… — LeonLee666/DiskANN0 reactions · 1 comment
- Mar 24, 2025Remove tcmalloc — yichuan-w/DiskANN0 reactions
- Mar 22, 2025Macos — yichuan-w/DiskANN0 reactions
- Mar 21, 2025Search graph — yichuan-w/DiskANN0 reactions
- Mar 7, 2025continued work — lbaierreinio/DiskANN0 reactions
- Jan 19, 2025Question regarding DiskANN Implementation — zilliztech/knowhere0 reactions · 2 comments
- Dec 31, 2024Feat: MultiHop beam search — yemaedahrav/DiskANN0 reactions
- Dec 3, 2024Exp: Branch to store experimental results and baselines — yemaedahrav/DiskANN0 reactions
- Jul 15, 2024Feature/search analyze — hyukychang/DiskANN0 reactions
- Mar 13, 2024Update search_memory_index.cpp — asharani97/DiskANN0 reactions
- Sep 8, 2023test: add test for quantization — tensorchord/pgvecto.rs0 reactions
- Aug 2, 2023add vector search libs? — a16z-infra/llm-app-stack0 reactions
- May 15, 2023Triggering a PR check — daxpryce/DiskANN0 reactions
- May 15, 2023Daxpryce/cicd refactor — daxpryce/DiskANN0 reactions
- May 10, 2023feat: DiskANN index — tensorchord/pgvecto.rs0 reactions · 4 comments
- Apr 26, 2023Moving my todo message to the right place — daxpryce/DiskANN0 reactions
- Apr 26, 2023Adding a todo message to also make sure the branches have a delta tha… — daxpryce/DiskANN0 reactions
- Apr 17, 2023Ranajoy/ood adaptive — ranonrkm/DiskANN0 reactions
- Apr 17, 2023Ranajoy/ood adaptive — ranonrkm/DiskANN0 reactions
- Apr 2, 2023Fixing Build errors in remove_extra_typedef (#290) — MarneniManoj/DiskANN0 reactions
- Feb 22, 2023Nmahapatro/label internal conversion — dkaczynski/DiskANN0 reactions
On Hacker News · 1
- May 23, 2022SSD-Based Vector Indices2 points
On Bluesky · 1
- Feb 12, 2026microsoft / DiskANN: Graph-structured Indices for Scalable, Fast, Fresh and Filtered Approximate Nearest Neighbor Search ★1691… — @rusttrending.bsky.social1 likes and repost
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 76
Do not add Tier 3 crates as dependencies of these Tier 4 crates:
- Very specific: line 97
When touching architecture-specific intrinsics, run cross-platform validation per diskann-wide/README.md:
- Distinctive: line 109
Add the license header when creating Rust source files.
- Very specific: line 117
Use focused, non-allocating error types.
- Very specific: line 118
Use thiserror for boilerplate and std::error::Error::source for error chaining.
- Very specific: line 122
Use diskann::ANNError for unrecoverable errors and its context machinery when propagating them.
- Very specific: line 123
When converting to ANNError, use #[track_caller] for better source reporting.
- Distinctive: line 133
Do not use a single crate-level error enum.
- Distinctive: line 155
Look for existing setup/execution infrastructure
- Distinctive: line 159
Add tests for derived traits (Clone, Debug, PartialEq)
- Distinctive: line 160
Add tests for enums unless they have explicit functionality
- Distinctive: line 167
Document non-obvious behavior, errors, safety, and design intent
- Very specific: line 168
Use # Errors, # Safety, # Panics, # Example sections
- Very specific: line 169
Keep documentation for internal pub(crate) / pub(super) items concise and additive.
- Distinctive: line 179
Before committing changes, run:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DiskANN Repository - Agent Onboarding Guide
Last Updated: 2026-10-29 (based on v0.61.0)
Table of Contents
- Repository Overview
- Repository Structure
- Dependencies
- Testing
- Code Quality & Linting
- Pre-commit Checklist
Repository Overview
DiskANN is a Rust implementation of scalable approximate nearest neighbor (ANN) search algorithms. The project is a rewrite from C++ to Rust.
- Language: Rust; edition in
Cargo.toml(workspace.package.edition), toolchain version inrust-toolchain.toml - License: MIT (see
LICENSE.txt) - Version: See
Cargo.toml - Architecture: Cargo workspace; members are defined in
Cargo.toml - Legacy Code: Older C++ code is on the
cpp_mainbranch (not maintained)
Key Resources
- Contributing: See
CONTRIBUTING.md(requires CLA) - Code of Conduct: See
CODE_OF_CONDUCT.md
Repository Structure
The repository uses a Cargo workspace with crates organized into functional tiers. See Cargo.toml for:
- Workspace members and their dependencies
- Shared dependency versions
- Build profiles (release, test)
- Workspace-level lints
Crate Organization
Tier 1: Foundation
diskann-wide/- Low-level SIMD, bit manipulation, type width abstractionsdiskann-vector/- Vector primitives and operations
Tier 2: Core Libraries
diskann-linalg/- Linear algebra operationsdiskann-utils/- Shared utilities (Reborrow, Matrix traits)diskann-quantization/- Vector quantization (PQ, SQ)
Tier 3: Algorithm & Storage
diskann/- Core ANN graph algorithm and in-memory indexing (CENTRAL crate)diskann-providers/- Storage abstraction layerdiskann-disk/- Disk-based indexing with io_uring supportdiskann-label-filter/- Inverted index for filtered searchdiskann-garnet/- Garnet vector-set integration and FFI bindingsdiskann-inmem/- In-memory index providerdiskann-bftree/- BfTree-backed storage provider for async indexes
Tier 4: Infrastructure & Tools
diskann-benchmark-runner/- Test runner infrastructurediskann-benchmark-core/- Benchmark frameworkdiskann-benchmark-simd/- SIMD-specific benchmarksdiskann-benchmark/- Benchmark definitions and runnersdiskann-record/- Versioned persistence with manifests and binary artifactsdiskann-tools/- CLI utilities (autotuner, etc.)
Dependencies
- Tier 1 and Tier 2 crates may be added as dependencies of any internal crate
diskannmay be added as a dependency of any equal or higher tier internal crate except those below- Do not add Tier 3 crates as dependencies of these Tier 4 crates:
diskann-benchmark-runnerdiskann-benchmark-core(diskannis allowed)diskann-benchmark-simd
Testing
Test Execution
- Bare
cargo testcovers onlyworkspace.default-membersinCargo.toml, not the entire workspace. - Choose the package and feature scope affected by the change.
- For workspace-wide validation, follow the
test-workspaceandtest-workspace-featuresjobs in.github/workflows/ci.yml, including their separate doc-test steps. - CI uses
cargo-nextest;.cargo/nextest.tomldefines timeouts, retries, and other runner settings.
Test Baseline Caching System
The diskann crate uses a baseline caching system for regression detection. See diskann/README.md for baseline usage and regeneration workflow.
AVX-512, Aarch64, and multi-platform
When touching architecture-specific intrinsics, run cross-platform validation per diskann-wide/README.md:
- Testing AVX-512 code on non-AVX-512 capable x86-64 machines.
- Testing Aarch64 code on x86-64 machines.
- Testing code compiled for and running on the
x86-64CPU (no AVX/AVX2) does not execute unsupported instructions.
Code Quality & Linting
License Headers
Add the license header when creating Rust source files.
Error Handling
There are three regimes of error handling and the strategy to use depends on the regime.
Low-Level Libraries
- Use focused, non-allocating error types.
diskann::ANNErroris not suitable at this layer. - Use
thiserrorfor boilerplate andstd::error::Error::sourcefor error chaining.
DiskANN Algorithms
- Use
diskann::ANNErrorfor unrecoverable errors and its context machinery when propagating them. - When converting to
ANNError, use#[track_caller]for better source reporting. - For traits whose associated errors may be non-critical, consider
ToRankedinstead ofInto<ANNError>. This preserves the distinction between transient and hard failures.
High-Level Tooling
anyhow::Error is appropriate at this layer.
Do Not
Do not use a single crate-level error enum. Problems:
- Provides no documentation on how an individual function could fail
- Encourages worse error messages than bespoke types
- Generates large structs that blow up the stack
- Branch-heavy
Dropimplementations which bloat code
Code Coverage
Code coverage of changes is required for PRs. See .codecov.yml for coverage policy and thresholds.
CI workflow
CI workflow is defined in .github/workflows/ci.yml. Key jobs include:
- Format and Clippy checks
- Tests on multiple platforms (Linux, Windows)
- Code coverage
- Architecture compatibility (SDE)
Test Patterns
DO:
- Look for existing setup/execution infrastructure
- Factor out common patterns
DON'T:
- Add tests for derived traits (Clone, Debug, PartialEq)
- Add tests for enums unless they have explicit functionality
Documentation
Less is more. Documentation goes out of date; rustdoc-generated output doesn't. Don't duplicate what rustdoc already provides for free (type listings, signatures, re-exports, intra-doc links).
DO:
- Document non-obvious behavior, errors, safety, and design intent
- Use
# Errors,# Safety,# Panics,# Examplesections - Keep documentation for internal
pub(crate)/pub(super)items concise and additive; critical items should still receive full documentation
DON'T:
- Maintain explicit lists of types/functions in module-level docs
- Restate what the signature already shows (e.g. "owns an
Arc<T>" on a struct whose only field isArc<T>)
Pre-commit Checklist
Before committing changes, run:
# Format all code
cargo fmt --all
# Run Clippy with warnings as errors
cargo clippy --workspace --all-targets -- -D warningsRepository-specific rules for the Clippy check:
clippy.toml: disallowed methods and their alternatives, including explicit Rayon thread-pool use and repository random helpers.Cargo.toml: workspace lints, including unsafe-block documentation.
This guide should be updated when major changes occur to the repository structure or development workflows.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

