postgis_raster × ducklink bridge (Phase B, compose:dynlink)

July 10, 2026 · View on GitHub

Auto-generated by sqlink-shim-codegen via --dynlink --target-dialect duckdb --target postgis_raster.

What this is

A wasm32-wasip2 cdylib that imports compose:dynlink/linker@0.1.0 and exports the canonical duckdb:extension@4.0.0 contract. At LOAD time the host's provider registry resolves the id postgis_raster-composed to the composed shim provider (typically the vendored postgis-raster-composed.wasm); scalar dispatch is a CBOR-envelope tunnel through linker.resolve-by-id + invoke.

Companion of the monolithic postgis-ducklink-bridge — this crate exposes only the postgis_raster sub-extension's surface, letting an operator LOAD postgis_raster; without pulling the full ~122MB postgis monolith.

Regenerate

See the "Phase B per-sub bridges (compose:dynlink)" section of SHIM-BRIDGES.md.

sqlink-shim-codegen \
  --dynlink \
  --target-dialect duckdb \
  --target postgis_raster \
  --catalog ~/git/postgis-shim-interface/postgis-catalog.toml \
  --interface ~/git/postgis-shim-interface/postgis-interface.sqlite \
  --out ~/git/postgis_raster-ducklink-bridge

Load into a host

ducklink:

export DUCKLINK_SUB_EXT_BRIDGES="postgis_raster=$(pwd)/target/wasm32-wasip2/release/postgis_raster_duckdb_bridge_dynlink.wasm"
export DUCKLINK_SUB_EXT_PREBUILT="postgis_raster=$HOME/git/datafission/extensions/postgis/deps/postgis-raster-composed.wasm"
ducklink -c "LOAD postgis_raster; SELECT st_astext(st_geomfromtext('POINT(1 2)'));"

Do not hand-edit

Regenerate from the source-of-truth interface DB via sqlink-shim-codegen. Changes made directly here are lost on the next regen.