Problem Description
Currently, librime relies on LevelDB for user dictionaries. This leads to several issues:
- Sync Conflicts: LevelDB's multi-file structure is prone to corruption on cloud drives (Dropbox, iCloud, etc.).
- Ubuntu/Linux Integration Hurdles: Users attempting to use SQLite-based plugins (like
librime-predict) or custom Lua-SQLite bindings on Ubuntu frequently encounter "failure to call SQLite" errors. These are often due to inconsistent linking, missing libsqlite3-dev dependencies in the default build scripts, or symbol conflicts when multiple plugins try to load SQLite differently.
- Data Opacity: LevelDB makes it difficult for users to inspect or fix their own data.
Proposed Solution
Introduce a first-class SqliteDb implementation within the core librime library.
- Unified Dependency: By making SQLite an optional but officially supported backend, the build system (
CMakeLists.txt) can consistently handle libsqlite3 detection and linking across Linux (Ubuntu), macOS, and Windows.
- Stable Storage: Use a single-file
.db schema for better sync compatibility.
- Robustness: Solve the "call failure" issues on Ubuntu by providing a standard, tested path for SQLite integration.
Alternatives Considered
Maintaining separate SQLite logic in various plugins, which has proven to be unstable and difficult to configure on Linux systems.
Problem Description
Currently,
librimerelies on LevelDB for user dictionaries. This leads to several issues:librime-predict) or custom Lua-SQLite bindings on Ubuntu frequently encounter "failure to call SQLite" errors. These are often due to inconsistent linking, missinglibsqlite3-devdependencies in the default build scripts, or symbol conflicts when multiple plugins try to load SQLite differently.Proposed Solution
Introduce a first-class
SqliteDbimplementation within the corelibrimelibrary.CMakeLists.txt) can consistently handlelibsqlite3detection and linking across Linux (Ubuntu), macOS, and Windows..dbschema for better sync compatibility.Alternatives Considered
Maintaining separate SQLite logic in various plugins, which has proven to be unstable and difficult to configure on Linux systems.