Mobile Embedding
WorkaDB is designed for mobile runtimes that cannot run a long-lived database server. The host controls when the engine is initialized and when it executes SQL.
Pattern
- Bundle
libworkadb.a, headers, and the template directory in the app. - On first run, copy the template into the app sandbox.
- Initialize the engine with a sandboxed
pgdata_pathandtmp_path. - Execute SQL via
wepg_stepor the Rust wrapper.
Because WorkaDB is embedded, it naturally follows the app lifecycle and can be shut down when the app is backgrounded.