I think I understand what you’re asking about. Fluent core intentionally does not deal with I/O, and we don’t bundle your resources for you. This is the role of a higher level bindings and layers that may do that.
In result at least that level of “treeshaking” is definitely not present - if you have 10 FTL files in your package and use only three, we will do nothing about how you package them or which ones you package.
The second “layer” would be - can you select subset of resources to be loaded (I/O), parsed, stored in memory? Yes.
We encourage you to divide your messages among different FTL files, like “debug.ftl”, “main.ftl”, “extension.ftl” etc. and then you can only load the ones you need. In production you may never need
debug.ftl, and in some model you may not need
I’d like to point out that
fluent-rs is currently fairly low level and higher level wrappers such as
i18n-embed or similar higher level API.
If you don’t, you’ll want to handle the bindings and I/O by yourself and then it’s up to you how you shake and package