Experiment with pure rust build with redb backend
Redb (https://github.com/cberner/redb) is a rust BTree database implementation.
If we implement a user dictionary backend in redb then we can optional remove sqlite as dependency.
Using SQLite format allows users to easily modify the database directly (https://github.com/chewing/libchewing/issues/385). Will this change block such an usage?
https://github.com/launchbadge/sqlx may be useful. It is written in pure Rust and supports SQLite (among several others)
We should provide tools to help users to modify the user dictionary, and this is planned after the rewrite.
Using SQLite is mostly fine. The problem is linking with C library complicates the build process, but it's mostly solved. This issue is to see if we can build libchewing completely without any C dependency to make development a bit easier.
We are already using rusqlite as a simple wrapper around SQLite so we don't need to look into sqlx.
Currently I know two tools for modifying user dictionaries, namely chewing-editor and the one from PIME. Both of them rely on libchewing, so there are limitations on how user dictionaries can be modified. Will the new tool allow changing arbitrary data in the database?
We are already using rusqlite as a simple wrapper around SQLite so we don't need to look into sqlx.
Here I mention sqlx as it can also make development easier and keeps SQLite format.
Yes, we can expose more powerful API for editors to use. We can also provide user dict <--> CSV or Excel conversion.
Here I mention sqlx as it can also make development easier and keeps SQLite format.
Appreciated. The user experience with rusqlite is already very good so the improvements from sqlx is limited. Besides, sqlx is more heavy weight and more suitable for web service usage.
Thank you very much for clarifications. I'd love those directions. Hopefully I can also contribute some codes - at least the C part.
Regarding sqlx: sorry I didn't check their codes carefully. Actually there is still C dependency due to usage of libsqlite3-sys.
We implemented with a simpler format CDB using https://github.com/kanru/cdb2-rs