pub const DUCKDB_API_VERSION: &str = "v1.2.0";Expand description
The DuckDB C API version string required by [duckdb_rs_extension_api_init][libduckdb_sys::duckdb_rs_extension_api_init].
Every DuckDB release from v1.4.x through v1.5.5 declares C extension API
version v1.2.0 (DUCKDB_EXTENSION_API_VERSION_{MAJOR,MINOR,PATCH} in
v1.5.5’s duckdb_extension.h are 1, 2, 0). v1.5.6 declares v1.5.6 and,
like every release, loads any C API version up to its own, so v1.2.0
works across the whole supported range. If you are targeting a different
DuckDB release, read that value from its duckdb_extension.h.
§Pitfall P2: C API version ≠ DuckDB release version
The -dv flag passed to append_extension_metadata.py must be this value
("v1.2.0"), not the DuckDB release version ("v1.4.4" / "v1.5.0" /
"v1.5.3"). With the wrong value the metadata script still succeeds, and
LOAD then refuses the file: “The file was built for DuckDB C API version
‘v1.5.5’, but we can only load extensions built for DuckDB C API ‘v1.2.0’
and lower”.
See Pitfall P2 for full details.