SDK-kit C ABI
BoutiqueDB links the engine through thesdk-kit C ABI (turso.h). This is the official surface for building language bindings, and it is the only surface that exposes async_io, per-open experimental features, and encryption.
Why sdk-kit instead of sqlite3.h
The bindings/c crate implements the SQLite 3 C API for compatibility. It is useful for dropping BoutiqueDB into existing SQLite code, but it has limits:
- The only experimental toggle is global
turso_enable_experimental(), which enables a subset of flags. - It cannot set
async_ioper open. - It cannot configure encryption keys per database.
sdk-kit (sdk-kit/turso.h) exposes a small, explicit C surface designed for bindings.
Key types and functions
Database lifecycle
Statement loop
Status codes
TURSO_OK,TURSO_DONE,TURSO_ROWTURSO_IO— drive I/O and resume.TURSO_BUSY— conflict or lock contention.TURSO_BUSY_SNAPSHOT— MVCC snapshot conflict.TURSO_ERROR— general error; checkerror_opt_out.
Swift mapping
TursoKit wraps these C calls into Swift types:
TursoOpenOptions maps to turso_database_config_t.
For the full C API, see sdk-kit/turso.h in the engine repo.
