fst no-std mode
This is a fork of fst adding support for no_std targets (see no_std usage for details).
If you're unsure whether to use this fork or the original one: Just use the original, chances are that's more up-to-date.
Documentation
Installation
Simply add a corresponding entry to your Cargo.toml dependency list:
[]
= "0.4"
Example
This example demonstrates building a set in memory and executing a fuzzy query
against it. You'll need fst_no_std = "0.4" with the levenshtein feature enabled in
your Cargo.toml.
use ;
use Levenshtein;
Check out the documentation for a lot more examples!
Cargo features
std- Enabled by default. Adds features that depend on the standard library.alloc- Enabled by default. Adds features that depend onalloc.levenshtein- Disabled by default. This adds theLevenshteinautomaton to theautomatonsub-module. This includes an additional dependency onutf8-rangesandstd.
no_std Usage
You can use this crate in no_std environments by disabling default features, like so:
[]
= { = "0.4", = false }
This way fst-no-std will not depend on the standard library and not even allocate (!) at the cost of being rather kneecaped: You can not construct FSTs and the evailable querying features are limited to simple lookups. You can optionally enable the alloc feature which adds a dependency on the alloc crate (i.e. you will need a global allocator) but it enables all querying features.