Starshard
English | 简体中文
A high-performance sharded concurrent HashMap for Rust, built on hashbrown and RwLock/tokio::sync::RwLock.
Features
- Lazy shard initialization
- O(1) atomic
len - Optional parallel iteration with
rayon - Async API with Tokio (feature
async) - Pluggable hashers (default:
fxhash)
Install
Add to Cargo.toml:
[]
= { = "0.1.0", = ["rayon", "async"] }
= "0.2.1"
= { = "0.16.0", = ["serde", "rayon"] }
= "1.11.0"
= { = "1.47.1", = ["sync", "rt-multi-thread"] }
Quick Start
use ShardedHashMap;
let map: = new;
map.insert;
assert_eq!;
License
Dual-licensed under MIT or Apache-2.0.
- See
LICENSE-MITandLICENSE-APACHE. - © 2025 houseme.