[API reference](https://evolu.dev/docs/api-reference) › [@evolu/sqlite-wasm](https://evolu.dev/docs/api-reference/sqlite-wasm) › [c-api](https://evolu.dev/docs/api-reference/sqlite-wasm/c-api) › sqlite3\_auto\_extension

```ts
function sqlite3_auto_extension(
  deps: SqliteWasmDep,
): (xEntryPoint: SqliteFunctionPtr) => SqliteResultCode;
```

Defined in: [packages/sqlite-wasm/src/CApi.ts:876](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/sqlite-wasm/src/CApi.ts#L876)

Registers an entry point that SQLite calls for every new connection, where an
error it returns fails the open; registering one twice is a no-op. Despite
the `void (*)(void)` prototype SQLite calls it as `int xEntryPoint(sqlite3
*db, char **pzErrMsg, const sqlite3_api_routines *pThunk)`, so its function
table entry must have that type.

Wasm type `i(i)`. Signature `["sqlite3_auto_extension", "int",
"funcptr:i(ppp)"]` from Evolu's supplement: SQLite binds the auto-extension
functions by hand to manage the JavaScript functions it converts.

See https://sqlite.org/c3ref/auto_extension.html.