odict icon indicating copy to clipboard operation
odict copied to clipboard

Is odict lightweight enough for mobile applications?

Open tinyc0der opened this issue 1 year ago • 4 comments

I’m considering using odict in a flutter mobile application and want to ensure it is suitable for this case.

tinyc0der avatar Nov 19 '24 13:11 tinyc0der

Hi @tinyc0der! It should be – most of the heavy features like search, tokenization, and more are all behind Rust feature flags, so you can just import the features you need. Without any enabled extra features, the core library is only 17 KB, so I can't imagine it would add much bloat at all to your app :)

Nickersoft avatar Nov 23 '24 08:11 Nickersoft

Also, the first beta of v2.0 just landed on crates.io! https://crates.io/crates/odict

Nickersoft avatar Nov 23 '24 08:11 Nickersoft

thanks for your info. However, i need typing suggestion (or prefix search). I'm afraid that tantivy is heavy for mobile device.

tinyc0der avatar Nov 25 '24 00:11 tinyc0der

That's totally fair – I chose tantivy as it seems to be the most mature full-text solution for Rust. I wonder if there's any kind of middle ground that could be added as a feature, such as a lightweight prefix trie search. Under the hood Entries are just a hash map, so I imagine if you invoked the Rust SDK directly and wrote bindings for Flutter you'd be able to roll your own search functionality if you like.

Nickersoft avatar Nov 25 '24 04:11 Nickersoft