18 releases

0.2.1 Oct 22, 2020
0.2.0 Jun 27, 2020
0.1.6 Nov 17, 2019
0.1.4 Oct 7, 2018
0.0.1 Mar 20, 2015

#37 in Data structures

Download history 180820/week @ 2024-02-28 185344/week @ 2024-03-06 190327/week @ 2024-03-13 200526/week @ 2024-03-20 184588/week @ 2024-03-27 194918/week @ 2024-04-03 184842/week @ 2024-04-10 184400/week @ 2024-04-17 166662/week @ 2024-04-24 147828/week @ 2024-05-01 147120/week @ 2024-05-08 160173/week @ 2024-05-15 155611/week @ 2024-05-22 153222/week @ 2024-05-29 153897/week @ 2024-06-05 123971/week @ 2024-06-12

616,424 downloads per month
Used in 454 crates (55 directly)

MIT license

255KB
2K SLoC

Rust Radix Trie

Unix Build Status 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.

Dependencies