Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

slab

> 编程语言
Open source

Slab allocator for Rust

919 stars0 likes0 views
WebsiteGitHub

About

Slab allocator for Rust

Slab

Pre-allocated storage for a uniform data type.

Crates.io Build Status

Documentation

Usage

To use slab, first add this to your Cargo.toml:

toml
[dependencies]
slab = "0.4"

Next, add this to your crate:

rust
use slab::Slab;

let mut slab = Slab::new();

let hello = slab.insert("hello");
let world = slab.insert("world");

assert_eq!(slab[hello], "hello");
assert_eq!(slab[world], "world");

slab[world] = "earth";
assert_eq!(slab[world], "earth");

See documentation for more details.

Feature flags

  • std (enabled by default) — Enables APIs that depend on std.
  • serde — Enables serde support (implements Serialize and Deserialize traits).

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in slab by you, shall be licensed as MIT, without any additional terms or conditions.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言