# indexmap-rs/indexmap

A hash table with consistent order and fast iteration; access items by key or sequence index

Repository: https://github.com/indexmap-rs/indexmap
Canonical: https://ross.abutalabs.com/products/indexmap
Homepage: https://docs.rs/indexmap/
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, hashtable
Last push: 2026-07-10T22:33:46+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 35, longevity 100
- inputs: {"age_days": 3639, "days_push": 54, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2413, forks 190 (observed 2026-08-28T04:06:44.494780+00:00)

## What it is
IndexMap is a pure-Rust hash table (with a companion IndexSet) that preserves insertion order, iterates quickly over compact storage, and lets entries be accessed by key or by numeric index. It is a drop-in replacement for std HashMap/HashSet built on hashbrown, with optional serde, rayon, and no_std support.

## Use cases
- rust hashmap that preserves insertion order
- iterate map entries in a deterministic order independent of hashing
- drop-in replacement for std HashMap with sorted iteration and pop
- look up map entries by numeric index as well as by key
- ordered set implementation in Rust
- no_std-compatible hash map for embedded or constrained targets
- serde-serializable ordered map or set

## When to choose
- You need iteration order to depend on insertion (or explicit sorting) rather than hash values
- You want std HashMap/HashSet API compatibility plus extras like pop, sorting, and index-based access
- Your workload iterates over the whole map frequently and benefits from dense, cache-friendly storage
- You need flexible key equality for borrowed vs owned keys via the Equivalent trait

## When to avoid
- You only care about raw lookup throughput and never iterate - std HashMap can be faster due to key-value locality
- You need strict ordering guarantees even after removals without paying O(n) shift_remove costs - consider the ordermap wrapper instead
- You need a concurrent or thread-safe shared map - IndexMap is not synchronized
- You need hash-based probabilistic structures or memory-bounded caches rather than an exact ordered map

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools
- platform: rust, cross-platform, embedded
- tags: data-structures, ordered-map, hashmap, hashset, insertion-order, no-std, indexmap, containers, algorithms

## Member repositories
- indexmap-rs/indexmap (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:44.494780+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:33:55.612767+00:00, confidence not recorded.
  - readme: https://github.com/indexmap-rs/indexmap (fetched 2026-08-28T04:06:44.494780+00:00, sha f002494bf69e)
  - homepage: https://docs.rs/indexmap/ (fetched 2026-08-29T10:14:03.222018+00:00, sha 9d4bd6f11e4f)
  - site_page: https://docs.rs/ (fetched 2026-08-29T10:14:03.256573+00:00, sha 38444eb0fe60)
  - site_page: https://docs.rs/crate/indexmap/latest (fetched 2026-08-29T10:14:03.263668+00:00, sha 6f52a219e998)
  - site_page: https://docs.rs/crate/indexmap/latest/features (fetched 2026-08-29T10:14:03.265646+00:00, sha 8c4731b33e3f)
  - site_page: https://docs.rs/about (fetched 2026-08-29T10:14:03.267262+00:00, sha 29ab7986fbf5)
  - site_page: https://docs.rs/about/badges (fetched 2026-08-29T10:14:03.268813+00:00, sha 6588cac258af)
  - site_page: https://docs.rs/about/builds (fetched 2026-08-29T10:14:03.270312+00:00, sha 811231ca4680)
  - site_page: https://docs.rs/about/metadata (fetched 2026-08-29T10:14:03.271940+00:00, sha 0dcdccb2b2b2)
  - site_page: https://docs.rs/about/redirections (fetched 2026-08-29T10:14:03.273687+00:00, sha 1b1efd93105f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
