NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4108 most downloaded on crates.io
Memory efficient trie (prefix tree) and map library based on LOUDS
Last release 2 years ago
no release in 18 months
Ships unpredictably
gaps range from 2 weeks to 4.8 years
Nearly every release is documented
notes for 6 of 6 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
7 releases · first in 2019
chore: Bump to version 0.4.2.
chore: Bump to version 0.4.2.
chore: Bump to version 0.4.1.
chore: Bump to version 0.4.1.
Now deriving the following traits, for many data structures:
One column per quarter.
IncSearch:
prefix(),prefix_len(),goto_longest_prefix().iter() method to Trie and map::Trie.chore: Run cargo readme.
chore: Run cargo readme.
Use iterators for search results.
Benefits being that they're lazy, short-circuitable, and require less memory.
let a: Vec<Vec<u8>> = trie.predictive_search("ech").take(10).collect();
Allow Label collection type to be specified.
This includes machinery in crate::try_collect to allow us to collect into
String directly.
let a: Vec<Vec<u8>> = trie.predictive_search("ech").collect();
let b: Vec<String> = trie.predictive_search("ech").collect();
Add incremental search.
Lets the user build their query one label at a time.
let mut builder = TrieBuilder::new();
builder.push("a", 0);
builder.push("app", 1);
builder.push("apple", 2);
let trie = builder.build();
let mut search = trie.inc_search();
assert_eq!(None, search.query(&b'z'));
assert_eq!(Answer::PrefixAndMatch, search.query(&b'a').unwrap());
assert_eq!(Answer::Prefix, search.query(&b'p').unwrap());
assert_eq!(Answer::PrefixAndMatch, search.query(&b'p').unwrap());
assert_eq!(Answer::Prefix, search.query(&b'l').unwrap());
assert_eq!(Answer::Match, search.query(&b'e').unwrap());
If your search can be O(log n) instead of O(m log n), do that.
Add Trie::postfix_search().
Add map::Trie::exact_match_mut() to mutate Values.
Add Trie::longest_prefix().
Find the longest prefix. This is the kind of behavior one would want to implement tab completion for instance.
No longer panics on zero-length string queries.
Previously a zero-length query would instantiate the entirety of the trie essentially uncompressed. Now, however, an iterator only allocates one word at a time, and one can limit their search results to avoid whole trie collection.
let b: Vec<String> = trie.predictive_search("").take(100).collect();
Merge branch 'master' of ssh://github.com/laysakura/trie-rs
Merge branch 'master' of ssh://github.com/laysakura/trie-rs
trie_rs::map::{Trie, TrieBuilder} (#20)is_prefix().(cargo-release) trie-rs version 0.1.1
(cargo-release) trie-rs version 0.1.1
(cargo-release) trie-rs version 0.1.0
(cargo-release) trie-rs version 0.1.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →