michaelsproul/rust_radix_trie

Fast generic radix trie implemented in Rust

Rust

221

130 commits

updated Aug 9, 2026

See the code

README

Rust Radix Trie

Windows Build Status

This is a Radix Trie implementation in Rust, building on the lessons learnt from TrieMap and Sequence Trie. You can read about my experience implementing this data structure here.

Help Wanted, Enquire Within

Since writing this code I haven't used it in anger (or production) so it is no doubt in need of some maintenance, testing and optimisation love. If you would like to help out, try solving an open issue, optimise something, or just have a poke around! Thanks :)

Features

  • Compressed nodes. Common key prefixes are stored only once.
  • Trie-specific methods to look-up closest ancestors and descendants.
  • Key Generic. Any type that can be serialised as a vector of bytes can be used as a key.
  • Safe - no unsafe code.

Documentation

https://docs.rs/radix_trie/

Usage

Available on Crates.io as radix_trie.

Just add radix_trie to the dependencies section of your Cargo.toml, like so:

radix_trie = "0.2"

Contributors

Made by:

License

MIT License. Copyright © Michael Sproul and contributors 2015-present.

data-structures
radix-trie
rust
trie

michaelsproul/rust_radix_trie

Fast generic radix trie implemented in Rust

Rust

221

130 commits

updated Aug 9, 2026

See the code

README

Rust Radix Trie

Windows Build Status

This is a Radix Trie implementation in Rust, building on the lessons learnt from TrieMap and Sequence Trie. You can read about my experience implementing this data structure here.

Help Wanted, Enquire Within

Since writing this code I haven't used it in anger (or production) so it is no doubt in need of some maintenance, testing and optimisation love. If you would like to help out, try solving an open issue, optimise something, or just have a poke around! Thanks :)

Features

  • Compressed nodes. Common key prefixes are stored only once.
  • Trie-specific methods to look-up closest ancestors and descendants.
  • Key Generic. Any type that can be serialised as a vector of bytes can be used as a key.
  • Safe - no unsafe code.

Documentation

https://docs.rs/radix_trie/

Usage

Available on Crates.io as radix_trie.

Just add radix_trie to the dependencies section of your Cargo.toml, like so:

radix_trie = "0.2"

Contributors

Made by:

License

MIT License. Copyright © Michael Sproul and contributors 2015-present.

data-structures
radix-trie
rust
trie

Project health

Overall

3.4/10

Maintained

0/10

Code review

3/10
OpenSSF Scorecard

Significant stargazers

Glen De Cauwsemaecker

262 followers · starred Apr 2025

Andréy Lesnikóv

410 followers · starred Sep 2024

Noam Teyssier

180 followers · starred Mar 2023

xixi

286 followers · starred Mar 2021