Robbepop/string-interner

A data structure to efficiently intern, cache and restore strings.

Rust

224

415 commits

updated May 6, 2026

See the code

README

String Interner

Continuous IntegrationTest CoverageDocumentationCrates.io
travisCIcodecovdocscrates

A data structure to cache strings efficiently, with minimal memory footprint and the ability to assicate the interned strings with unique symbols. These symbols allow for constant time comparisons and look-ups to the underlying interned string contents. Also, iterating through the interned strings is cache efficient.

Contributing

Testing

Test the project using

cargo test --release

Memory Allocation Tests

To further test memory consumption and allocations performed by the different string interner backends test the project as follows:

cargo test --release --features test-allocations -- --test-threads 1
  • The --features test-allocations enables the memory allocations tests.
  • The --test-thread 1 argument is required for the memory allocations tests since otherwise they interfere with each other causing them to randomly fail.
  • Use --nocapture to receive verbose output useful for debugging.

Profiling & Benchmarks

Benchmark the string interner and its various backends using

cargo bench

License

Licensed under either of

at your option.

Dual licence: badge badge

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

bidirectional
datastructures
interner
interning
mapping
rust
storage
string

Robbepop/string-interner

A data structure to efficiently intern, cache and restore strings.

Rust

224

415 commits

updated May 6, 2026

See the code

README

String Interner

Continuous IntegrationTest CoverageDocumentationCrates.io
travisCIcodecovdocscrates

A data structure to cache strings efficiently, with minimal memory footprint and the ability to assicate the interned strings with unique symbols. These symbols allow for constant time comparisons and look-ups to the underlying interned string contents. Also, iterating through the interned strings is cache efficient.

Contributing

Testing

Test the project using

cargo test --release

Memory Allocation Tests

To further test memory consumption and allocations performed by the different string interner backends test the project as follows:

cargo test --release --features test-allocations -- --test-threads 1
  • The --features test-allocations enables the memory allocations tests.
  • The --test-thread 1 argument is required for the memory allocations tests since otherwise they interfere with each other causing them to randomly fail.
  • Use --nocapture to receive verbose output useful for debugging.

Profiling & Benchmarks

Benchmark the string interner and its various backends using

cargo bench

License

Licensed under either of

at your option.

Dual licence: badge badge

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

bidirectional
datastructures
interner
interning
mapping
rust
storage
string

Project health

Latest release

0.20.0 · Apr 30, 2026

Releases this year

1

Significant stargazers

Val Packett

580 followers · starred May 2026

Renée

501 followers · starred Mar 2024

Sergei Shulepov

314 followers · starred Nov 2023

Shaun Jackman

711 followers · starred Feb 2023