Skip to main content

check

Function check 

Source
pub unsafe fn check() -> AbiCheck
Expand description

Checks whether the running DuckDB uses the same duckdb_ext_api_v1 layout this extension was compiled against.

Returns AbiCheck::StableOnly immediately when the crate was built without the duckdb-1-5 feature, since the stable prefix is frozen and no check is needed.

Otherwise, in order:

  1. If built_against_version is set and names a release whose verified slot count contradicts the compiled bindings, that is AbiCheck::DeclaredVersionMismatch — the build is misconfigured.
  2. If it is set and equals the engine’s version, the layouts match by construction: AbiCheck::Compatible.
  3. Otherwise the engine’s version is looked up in the verified table and its slot count compared with the compiled one.

§Safety

The DuckDB C API dispatch table must already have been initialised — see engine_version.