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,127 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
60 /100 Good
Development Activity 40
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 20 apps in this directory

Go
59%
Apache 2.0

Cog

AI Development · Developer Tools · Devops

9,495

An open-source CLI that packages machine learning models into standard, production-ready Docker containers — no Dockerfile wrangling, no CUDA version hell.

View details
86
Repo Health
88
Technical
68
Dependency
Built with
Go 59%
Rust 17%
HTML 13%
Updated 1 weeks ago
Go
35%
Apache 2.0

CubeSandbox

AI Agents · Developer Tools · Security

13,184

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
84
Repo Health
88
Technical
63
Dependency
Built with
Go 35%
Rust 24%
C 21%
Updated 1 weeks ago
TypeScript
88%
MIT

DevTools-X

Developer Tools

1,538

41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.

View details
48
Repo Health
68
Technical
67
Dependency
Built with
TypeScript 88%
Updated 5 months ago
Python
81%
Apache 2.0

headroom

AI Development · Developer Tools

79,035

Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.

View details
85
Repo Health
86
Technical
69
Dependency
Built with
Python 81%
Rust 12%
Updated 1 weeks ago
Rust
37%
Other

Hook0

Devops

1,507

Open-source Webhooks-as-a-Service: deliver events to your users with auto-retry, signed payloads, and a real-time subscriber dashboard — all without building the infrastructure yourself.

View details
83
Repo Health
82
Technical
69
Dependency
Built with
Rust 37%
TypeScript 12%
Updated 1 weeks ago
TypeScript
68%
MIT

Hoppscotch

Developer Tools

80,762

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
88
Repo Health
83
Technical
62
Dependency
Built with
TypeScript 68%
Vue 23%
Updated 1 weeks ago
Rust
70%
Other

iii

Developer Tools · Devops

18,926

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 70%
TypeScript 16%
Updated 1 weeks ago
Rust
96%
Apache 2.0

InfluxDB

Analytics · Databases

31,803

Open-source time-series database built for real-time ingest, fast SQL queries, and embedded Python automation — powered by Apache Arrow and Parquet.

View details
78
Repo Health
76
Technical
72
Dependency
Built with
Rust 96%
Updated 1 weeks ago
TypeScript
63%
Apache 2.0

Laminar

AI Development · Monitoring

3,477

Open-source observability platform purpose-built for AI agents — trace, evaluate, debug, and monitor at scale with SQL access and real-time replay.

View details
86
Repo Health
76
Technical
65
Dependency
Built with
TypeScript 63%
Rust 36%
Updated 1 weeks 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