[Help] Does the FST file format work cross-platform?
First, thank you for this marvelous library. I'm experimenting with fst for my first ever Rust project, and for my use case, fst provides 10x the compression of gzip with a minimal lookup penalty at runtime.
My question is: does the .fst file created by MapBuilder work across platforms? Ideally I could generate this file just once on my Macbook then distribute it across all of the platforms I want to support: Linux x64, Wasm, ...
I checked the docs, but I couldn't find a clear answer to this question. But then again, I'm a Rust newbie who's fairly new to systems programming, so perhaps there's an obvious answer I'm just not aware of.
Thank you for your time!
(PS: I'm not sure what the right forum is for help questions, so forgive me if I'm in the wrong place.)
Yes. If it weren't cross platform, then there would be different functions for serializing the FST, like how regex-automata has both big-endian and little-endian serialization routines: https://docs.rs/regex-automata/latest/regex_automata/dfa/dense/struct.DFA.html#impl-3
For FSTs though, endianness is always explicitly specified when reading and writing, so there aren't any platform incompatibility issues. To be clear, the exact same byte-for-byte FST can be used on any platform, regardless of endianness or anything else.