Skip to main content

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

  1. Bundle libworkadb.a, headers, and the template directory in the app.
  2. On first run, copy the template into the app sandbox.
  3. Initialize the engine with a sandboxed pgdata_path and tmp_path.
  4. Execute SQL via wepg_step or the Rust wrapper.

Because WorkaDB is embedded, it naturally follows the app lifecycle and can be shut down when the app is backgrounded.