#vec #rc #rust-std #hash-set #hash-map #thread-local #btree-map #allocator #btree-set #boxing

pstd

Crate with parts of Rust std library ( different implementations, features not yet stabilised etc )

126 stable releases

Uses new Rust 2024

1.0.135 May 23, 2026
1.0.130 Apr 26, 2026
1.0.69 Mar 31, 2026
1.0.3 Jan 12, 2025
0.1.19 May 28, 2024

#1 in Memory management

Download history 648/week @ 2026-03-09 839/week @ 2026-03-16 496/week @ 2026-03-23 319/week @ 2026-03-30 223/week @ 2026-04-06 237/week @ 2026-04-13 403/week @ 2026-04-20 262/week @ 2026-04-27 283/week @ 2026-05-04 485/week @ 2026-05-11 350/week @ 2026-05-18 318/week @ 2026-05-25 124/week @ 2026-06-01

1,284 downloads per month
Used in 6 crates (5 directly)

MIT/Apache

510KB
12K SLoC

Crate with parts of Rust std library ( different implementations, features not yet stabilised etc ), in particular [Box], [Vec], [Rc], String and [collections]::{ BTreeMap, BTreeSet, HashMap, HashSet }.

Box, Rc and String do not have all std methods/traits implemented.

HashMap and HashSet are imported from the hashbrown crate.

RcStr is a reference-counted string based on RcSlice.

The localalloc module has allocator implementations.

Features

This crate supports the following cargo features:

  • serde : enables serialisation of [Vec], String, BTreeMap and BTreeSet via serde crate.
  • unsafe-optim : Enable unsafe optimisations in release mode.
  • dynbox : enables Boxing of dyn values, requires nightly toolchain. An alternative is to use the [unsize_box] macro.
  • log-alloc : prints details of thread-local allocation when thread terminates.

Crate with parts of Rust std library ( different implementations, features not yet stabilised etc ), in particular Box, Vec, Rc, String and collections::{ BTreeMap, BTreeSet, HashMap, HashSet }.

Box, Rc and String do not have all std methods/traits implemented.

HashMap and HashSet are imported from the hashbrown crate.

RcStr is a reference-counted string based on RcSlice.

The localalloc module has fast thread-local bump allocators.

crates.io : https://crates.io/crates/pstd

documentation: https://docs.rs/pstd/latest/pstd/

Dependencies

~3MB
~58K SLoC