Manishearth/elsa

Append-only collections for Rust where borrows to entries can outlive insertions

Rust

280

227 commits

updated Sep 12, 2026

See the code

README

elsa

Build Status Current Version License: MIT/Apache-2.0

🎵 Immutability never bothered me anyway 🎶

This crate provides various "frozen" collections.

These are append-only collections where references to entries can be held on to even across insertions. This is safe because these collections only support storing data that's present behind some indirection -- i.e. String, Vec<T>, Box<T>, etc, and they only yield references to the data behind the allocation (&str, &[T], and &T respectively)

The typical use case is having a global cache of strings or other data which the rest of the program borrows from.

Running all examples

cargo test --examples --features indexmap

Manishearth/elsa

Append-only collections for Rust where borrows to entries can outlive insertions

Rust

280

227 commits

updated Sep 12, 2026

See the code

README

elsa

Build Status Current Version License: MIT/Apache-2.0

🎵 Immutability never bothered me anyway 🎶

This crate provides various "frozen" collections.

These are append-only collections where references to entries can be held on to even across insertions. This is safe because these collections only support storing data that's present behind some indirection -- i.e. String, Vec<T>, Box<T>, etc, and they only yield references to the data behind the allocation (&str, &[T], and &T respectively)

The typical use case is having a global cache of strings or other data which the rest of the program borrows from.

Running all examples

cargo test --examples --features indexmap

Project health

crates.io

Latest release

1.11.2 · Mar 8, 2025

Releases this year

0

Significant stargazers

Rain

851 followers · starred Mar 2021

Lukas Wirth

679 followers · starred Jun 2022

Luca Palmieri

3,341 followers · starred May 2025

Boshen

2,223 followers · starred Jul 2023