# orlp/slotmap

Slotmap data structure for Rust

Repository: https://github.com/orlp/slotmap
Canonical: https://ross.abutalabs.com/products/slotmap
Language: Rust
License: Zlib
License Family: permissive
Last push: 2026-05-09T14:55:44+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 81, release rhythm 35, longevity 100
- inputs: {"age_days": 2984, "days_push": 116, "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 1350, forks 92 (observed 2026-08-28T04:04:28.114633+00:00)

## What it is
A Rust library providing slot map containers (SlotMap, HopSlotMap, DenseSlotMap) that return persistent unique keys on insertion for O(1) access, insertion, and deletion. It also includes SecondaryMap and SparseSecondaryMap for attaching additional data to those keys.

## Use cases
- store game entities with stable safe handles
- manage graph nodes without ownership issues
- need O(1) insertion, deletion, and lookup with stable keys
- attach secondary data to slot map keys
- replace index-based arenas with safe key-based storage

## When to choose
- you need stable references to collection elements that survive insertions and deletions
- you are building games, ECS-like systems, or graph structures in Rust
- you want a well-tested, permissively licensed, widely used Rust crate

## When to avoid
- you need ordered or sorted iteration by key
- you need key-value semantics with arbitrary user-defined keys rather than generated handles
- you are not working in Rust

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools
- platform: rust
- tags: slotmap, arena, data-structure, stable-keys, rust-library, algorithms, game-development

## Member repositories
- orlp/slotmap (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:28.114633+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-30T04:42:18.202440+00:00, confidence not recorded.
  - readme: https://github.com/orlp/slotmap (fetched 2026-08-28T04:04:28.114633+00:00, sha eb3e06aca2df)
  - registry_crates: https://crates.io/api/v1/crates/slotmap (fetched 2026-08-29T12:01:06.533802+00:00, sha 8e08ca37d101)
- Data as of 2026-08-30T08:39:29.467469+00:00.
