DashMap
A blazing-fast concurrent HashMap for Rust that shards state across locks instead of using one global RwLock.
Repository Health
Technical Analysis
DashMap implements a concurrent associative array for Rust, designed as a near drop-in replacement for RwLock<HashMap<K, V>>. Instead of guarding the whole map behind a single lock, it shards entries across many internal locks, so concurrent readers and writers touching different keys rarely contend with each other.
All of DashMap’s methods take &self rather than &mut self, which means a DashMap can be wrapped in an Arc and shared across threads while still supporting in-place mutation — a pattern that’s awkward to express safely with the standard library’s HashMap alone. The crate builds on hashbrown for its underlying table implementation and parking_lot for its locking primitives, and offers optional serde and rayon integrations for serialization and parallel iteration.
What You Get
- A sharded concurrent HashMap and HashSet with an API closely mirroring
std::collections::HashMap - All methods take
&self, so the map works behind anArcwithout an outerMutex/RwLock - Built on
hashbrown(SwissTable-style hashing) andparking_lotfor low-overhead locking - Optional
rayonfeature for parallel iteration over entries - Optional
serdefeature for (de)serializing the map - A
raw-apifeature exposing lower-level shard access for advanced use cases
Common Use Cases
- Shared in-memory caches accessed concurrently from multiple async tasks or threads
- Connection/session registries in servers where many threads insert, update, and evict entries
- Counters, rate-limiter state, or metrics maps updated from parallel workers
- Replacing a
Mutex<HashMap<_, _>>orRwLock<HashMap<_, _>>bottleneck identified via profiling
Under The Hood
Architecture — DashMap’s core (lib.rs) partitions the map into a fixed number of shards, each an independent hashbrown table guarded by its own parking_lot::RwLock; a key’s shard is selected by hashing, so operations against different shards proceed with no contention. mapref/setref modules provide guard types (Ref/RefMut) that hold a shard’s lock for the lifetime of the borrow, giving reference-like ergonomics without exposing the underlying lock directly. Tech Stack — pure Rust (2021 edition, MSRV 1.70), built on hashbrown for its table implementation, parking_lot/lock_api for lighter-weight locks than the stdlib’s, crossbeam-utils for cache-line padding to avoid false sharing between shards, and optional rayon/serde/arbitrary/typesize integrations behind Cargo features. Code Quality — set.rs and read_only.rs reuse the same sharded-map core to offer a DashSet and a read-only view without duplicating logic; the crate has shipped 60+ releases since 2019, though recent commit activity is low (health-score data shows low recent development activity despite the project’s maturity and continued adoption). API Design — the public API deliberately mirrors std::collections::HashMap (get, insert, remove, entry, iter) so existing HashMap code ports over with minimal changes, and the key ergonomic difference — all methods taking &self instead of &mut self — is called out prominently in the README specifically so users understand why the map is safe to share via Arc without an outer lock.
Used by 21 apps in this directory
Vaultwarden
Password Manager · Security
Unofficial Bitwarden-compatible server in Rust — run the full Bitwarden ecosystem on a Raspberry Pi using every official client you already have, without the multi-container overhead.
Vibe Kanban
AI Agents · AI Code Assistants · Project Management
A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.
Volga
Data Engineering
A Rust-based real-time data processing engine for AI/ML feature computation, built on Apache DataFusion and Arrow — positioned as an alternative to Flink, Spark, Chronon, and OpenMLDB with unified streaming, batch, and request-time execution.