Recommended data provider type for libraries depending on ICU4X #3688
Replies: 2 comments 7 replies
-
If you know the data you want at build time, I suggest using a baked data provider, otherwise use a Blob one with postcard. You can generate data using these steps In the 1.3 release there will be a |
Beta Was this translation helpful? Give feedback.
-
Sadly I would not know what data provider the users of my library would be using at build time, thus trying to figure out best approach to support any type of provider that the users would use for my library.
|
Beta Was this translation helpful? Give feedback.
-
I finished creating a library that uses ICU4X as its backend, while learning Rust. Successfully created toy examples using the library using icu_testdata, and I learnt quite a bit of Rust in the process. For my library I used the DataProvider for as the interface to CLDR data (currently just using icu_testdata, though seen the page to generate customised datasets). I did also at the beginning also played with the FsDataProvider, yet thought my library should be more generic in nature, thus used DataProvider instead.
Now busy creating a small application using my library, yet ran into a snag in using my library. main() can't have generics/traits specified.
So now I am wondering what would be the recommended data provider to use for a library using ICU4X as its backend? In order to avoid the issue of generics / trait types needing to be specified in the main() function.
Beta Was this translation helpful? Give feedback.
All reactions