[0] https://github.com/BurntSushi/fst
[1] https://blog.burntsushi.net/transducers/
The main limitation of it is that it doesn't support removal, but if removals are infrequent you can workaround that with another fst with removed items (and periodically rebuild the whole thing)