DashMap

A blazing-fast concurrent HashMap for Rust that shards state across locks instead of using one global RwLock.

Library
Cargo
v6.2.1
4,124 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
62 /100 Good
Development Activity 48
Maintenance 44
Community 56
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 84
Code Quality 78
Innovation 80
Learning Curve 82

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 an Arc without an outer Mutex/RwLock
  • Built on hashbrown (SwissTable-style hashing) and parking_lot for low-overhead locking
  • Optional rayon feature for parallel iteration over entries
  • Optional serde feature for (de)serializing the map
  • A raw-api feature 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<_, _>> or RwLock<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

Rust
78%
AGPL 3.0

Lemmy

Community · Social Media

14,644

Federated, self-hosted Reddit alternative with full community ownership and no corporate control.

View details
91
Repo Health
74
Technical
62
Dependency
Built with
Rust 78%
PLpgSQL 14%
Updated 6 days ago
Rust
48%
MIT

Meetily

AI Assistants · Productivity

32,103

Privacy-first AI meeting assistant that transcribes and summarizes your meetings entirely on your local machine — no cloud, no data leakage.

View details
87
Repo Health
72
Technical
67
Dependency
Built with
Rust 48%
TypeScript 29%
Updated 6 days ago
Python
73%
AGPL 3.0

OpenViking

AI Development · AI Memory · Databases

40,705

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
85
Repo Health
75
Technical
64
Dependency
Built with
Python 73%
TypeScript 12%
Rust 11%
Updated 5 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 5 days ago
Java
93%
Apache 2.0

QuestDB

Analytics · Databases

17,466

A high-performance, open-source time-series database built for financial market data, IoT telemetry, and real-time analytics, combining a zero-GC Java/C++ core with SIMD-accelerated SQL and a WAL-to-Parquet storage engine.

View details
91
Repo Health
86
Technical
67
Dependency
Built with
Java 93%
Updated 5 days ago
Rust
93%
Other

Tabby

AI Code Assistants

33,924

Self-hosted AI coding assistant — run GitHub Copilot-grade code completion on your own hardware with no cloud dependency.

View details
55
Repo Health
78
Technical
61
Dependency
Built with
Rust 93%
Updated 4 months ago
Rust
66%
Apache 2.0

Temps

Analytics · Devops · Monitoring

865

A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.

View details
81
Repo Health
86
Technical
66
Dependency
Built with
Rust 66%
TypeScript 33%
Updated 6 days ago
Rust
79%
Apache 2.0

TensorZero

Ab Testing Experimentation · AI Development · Monitoring

11,708

TensorZero unifies the LLM gateway, observability, evaluation, optimization, and experimentation stack behind a single OpenAI-compatible API, built in Rust for sub-millisecond p99 latency.

View details
53
Repo Health
87
Technical
68
Dependency
Built with
Rust 79%
TypeScript 15%
Updated 4 months ago
Rust
71%
MIT

Trieve

AI Development · Developer Tools · Search

2,721

All-in-one self-hostable platform for hybrid search, RAG, recommendations, and analytics built on Rust and Qdrant.

View details
42
Repo Health
74
Technical
65
Dependency
Built with
Rust 71%
Updated 9 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers