PackageTrack
Sign in Get early access

prefix-trie

Prefix trie (tree) datastructure (both a set and a map) that provides exact and longest-prefix matches.

0.10.1 13M downloads/mo #2731 most downloaded on crates.io tiborschneider/prefix-trie

What this package is like to depend on

Last release 1 months ago

24 Jul 2026

Release timing varies

gaps range from 1 weeks to 9 months

Some releases are documented

notes for 8 of 26 stable releases

Nothing withdrawn

no release was ever pulled

4 years old

26 releases · first in 2022

10 releases in the last 12 months

see the full history below

Release timeline

26 releases · Dec 2022 to Jul 2026
2023 2024 2025 2026
Release Pre-release

Releases

latest 26
  1. 0.10.1 24 Jul 2026

    Nothing published for this version

  2. 0.10.0 24 Jul 2026
    Release notes

    What's new

    rkyv zero-copy (de)serialization

    This release adds a new rkyv feature flag, bringing zero-copy serialization support to PrefixMap, PrefixSet, and JointPrefixMap/JointPrefixSet. The archived types implement the same TrieView interface as their live counterparts, so you can look up, iterate, and compute covering/LPM/SPM queries directly on the archived (mmap'ed) representation without deserializing.

    • get, get_key_value, contains, get_lpm, get_spm, is_covered, is_covered_in_aggregate, address_count, children, iter/iter_from, and cover iterators are all available on the archived variants.
    • ArchivedTrieRef type that implements TrieView, enabling integration with concrete (non-archive) types. The new functions on TrieView simplify this process.
    • See the new module-level examples for how to serialize, mmap, and query an archived trie.

    Others

    • New FilterView to filter a view by a predicate closure.
    • New ClonedView and CopiedView adapters.
    • New MapView combinator for TrieView.
    • is_covered and is_covered_in_aggregate added to the core map/set API.

    Fixes

    • Fixed a repositioning bug in TrieView that could cause UB.
    • Fixed Default implementations on Joint iterators (were previously inconsistent/incorrect).
    • Removed step and navigate_to from the public TrieView interface (internal-only).

    Other

    • Raised rust minimal supported version to 1.81.0

    Full Changelog: v0.9.4...v0.10.0

    Open source →
  3. 0.9.4 19 Jul 2026
    Release notes

    What's Changed

    • Feature: Add address_count to PrefixMap, PrefixSet, and JointPrefixMap by @digizeph in #31
    • Example: add streaming export/import example by @digizeph in #32
    • Fix: remove_children now properly cleans up the tree.

    New Contributors

    Full Changelog: v0.9.3...v0.9.4

    Open source →
  4. 0.9.3 05 Jul 2026
    Release notes

    New Aggregation Algorithms

    • PrefixMap::aggregate_consistent and PrefixSet::aggregate_consistent remove covering prefixes (that are covered with the same value). Any get_lpm call (for any prefix) will still return the same value (with a potential different result).
    • PrefixSet::aggregate removes covering prefixes and merges adjacent ones. In contrast to aggregate_consistent, calling get_lpm on addresses (e.g., /32 on IPv4) still yields the same value. However, for prefixes, that is not the case.
    • PrefixMap::aggregate, PrefixMap::aggregate_fill, and PrefixMap::aggregate_fill_default are implementation of the ORTC algorithm by R. P. Draves, C. King, S. Venkatachary, and B. D. Zill. The fill variants are allowed to add new prefixes (e.g., 0.0.0.0/0) with the provided default value, while the non-fill variant does ensures that uncovered prefixes remain uncovered.

    Bug Fixes

    • Add missing joint::map::OccupiedEntry::into_mut function

    Full Changelog: v0.9.1...v0.9.3

    Open source →
  5. 0.9.2 18 May 2026

    Nothing published for this version

  6. 0.9.1 18 May 2026
    Release notes

    What's Changed

    • Add iter_from function to enable paginated output.
    • Implement equality on views (eq_keys and eq_by)
    • Add Eq implementation for PrefixMap
    • Slightly reduce memory footprint (increment number of tiers in allocator from 6 to 7; [1, 2, 4, 8, 16, 24, 32])
    • Benchmark using mutations from RIPE RIS by @ties in #28
    • Add IPv6 test cases and data by @ties in #30

    Bug Fixes

    • Drop values only when needed.
    • Fix memory corruption bug when calling remove_children in deep trees.
    • Fix overflow for obtaining sub-views of maximum prefix length views.
    • Fix mask computation on 32-bit targets.
    • Fix undefined behavior when drop panics in remove_children.

    New Contributors

    • @ties made their first contribution in #28

    Full Changelog: v0.9.0...v0.9.1

    Open source →
  7. 0.9.0 14 May 2026
    Release notes

    What's Changed

    • Migrate to the TreeBitMap implementation by W. Eatherton, Z. Dittia, G. Varghes.
    • ~4x less memory consumption and ~8x performance improvement over v0.8.4, measured on all IPv4 prefixes advertised at AMS-IX.
    • Flexible simultaneous tree traversal algorithms that can be combined arbitrarily.

    Migration Notes

    • Prefixes are reconstructed from the tree location and no longer stored.
      Consequently, information in the host part of an address is no longer maintained.
      Additionally, the function yields prefixes by value instead of by reference.
      If you wish to store the host-bits as well, consider constructing a type PrefixMap<P, (P, T)>.
    • Mutable views of the tree can no longer modify the tree structure (to maintain memory safety).
      This is because one can construct two mutable views pointing to branches within the same multi-bit node.
    • Thanks to bitmaps, set operations can now be chained (as we can define a common interface for them to return their bitmaps).J

    Full Changelog: v0.8.4...v0.9.0

    Open source →
  8. 0.8.4 11 May 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v0.8.3...v0.8.4

    Open source →
  9. 0.8.3 04 May 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v0.8.2...v0.8.3

    Open source →
  10. 0.8.2 22 Mar 2026
    Release notes
    • Reduced memory usage by applying niche optimization (thanks to #22)
    Open source →
  11. 0.8.1 19 Jun 2025

    Nothing published for this version

  12. 0.8.0 18 Jun 2025

    Nothing published for this version

  13. 0.7.0 04 Apr 2025

    Nothing published for this version

  14. 0.6.0 26 Jan 2025

    Nothing published for this version

  15. 0.5.1 15 Sep 2024

    Nothing published for this version

  16. 0.5.0 28 Aug 2024

    Nothing published for this version

  17. 0.4.2 03 Jul 2024

    Nothing published for this version

  18. 0.4.1 21 May 2024

    Nothing published for this version

  19. 0.4.0 14 May 2024

    Nothing published for this version

  20. 0.3.0 10 Mar 2024

    Nothing published for this version

  21. 0.2.5 11 Jan 2024

    Nothing published for this version

  22. 0.2.4 09 Jan 2023

    Nothing published for this version

  23. 0.2.3 06 Jan 2023

    Nothing published for this version

  24. 0.2.2 04 Jan 2023

    Nothing published for this version

  25. 0.2.1 03 Jan 2023

    Nothing published for this version

  26. 0.2.0 30 Dec 2022

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive