Crates.io | starshard |
lib.rs | starshard |
version | 0.2.0 |
created_at | 2025-09-25 15:17:26.623822+00 |
updated_at | 2025-09-25 15:44:35.351766+00 |
description | A blazing-fast sharded concurrent HashMap using hashbrown and RwLock, with lazy shards, atomic length cache, and async support. |
homepage | https://houseme.github.io/starshard |
repository | https://github.com/houseme/starshard |
max_upload_size | |
id | 1854752 |
size | 52,490 |
English | 简体中文
A high-performance sharded concurrent HashMap for Rust, built on hashbrown
and RwLock
/tokio::sync::RwLock
.
len
rayon
async
)fxhash
)Add to Cargo.toml
:
[dependencies]
starshard = { version = "0.1.0", features = ["rayon", "async"] }
use starshard::ShardedHashMap;
let map: ShardedHashMap<String, i32> = ShardedHashMap::new(64);
map.insert("k".into(), 1);
assert_eq!(map.get(&"k".into()), Some(1));
Dual-licensed under MIT or Apache-2.0.
LICENSE-MIT
and LICENSE-APACHE
.