postgis_sfcgal × 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_sfcgal.
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_sfcgal-composed to the composed shim
provider (typically the vendored postgis-sfcgal-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_sfcgal sub-extension's surface,
letting an operator LOAD postgis_sfcgal; 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_sfcgal \
--catalog ~/git/postgis-shim-interface/postgis-catalog.toml \
--interface ~/git/postgis-shim-interface/postgis-interface.sqlite \
--out ~/git/postgis_sfcgal-ducklink-bridge
Load into a host
ducklink:
export DUCKLINK_SUB_EXT_BRIDGES="postgis_sfcgal=$(pwd)/target/wasm32-wasip2/release/postgis_sfcgal_duckdb_bridge_dynlink.wasm"
export DUCKLINK_SUB_EXT_PREBUILT="postgis_sfcgal=$HOME/git/datafission/extensions/postgis/deps/postgis-sfcgal-composed.wasm"
ducklink -c "LOAD postgis_sfcgal; 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.