Skip to content
vic

Manishearth/elsa

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

Manishearth/elsa.json
{
"createdAt": "2018-12-21T00:15:25Z",
"defaultBranch": "master",
"description": "Append-only collections for Rust where borrows to entries can outlive insertions",
"fullName": "Manishearth/elsa",
"homepage": null,
"language": "Rust",
"name": "elsa",
"pushedAt": "2025-11-18T15:11:53Z",
"stargazersCount": 264,
"topics": [],
"updatedAt": "2025-11-18T15:11:57Z",
"url": "https://github.com/Manishearth/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.

Terminal window
cargo test --examples --features indexmap