Load portable WebAssembly extension modules into DuckDB from SQL
Installing and Loading
INSTALL ducklink FROM community;
LOAD ducklink;
Example
LOAD ducklink;
SELECT ducklink_version();
-- ducklink hosts portable WebAssembly extension modules. Browse the
-- catalog of modules it can load (offline-safe via a bundled snapshot):
SELECT name, description FROM ducklink.modules LIMIT 5;
-- Load one by name — ducklink fetches, sha256-verifies, and caches the
-- component, then registers its functions for use in later statements:
-- FROM ducklink_load('aba');
-- SELECT aba_validate('021000021'); -- true
About ducklink
ducklink turns DuckDB into a host for portable WebAssembly extension
modules. A module is built once against the duckdb:extension WIT world
and runs on any supported platform — no per-platform native build.
The interface is SQL-native and catalog-backed. ducklink_load('<name>')
resolves a name against a curated online catalog, downloads the component
(sha256-verified) into a local cache, and registers the scalar / table /
aggregate functions it declares for use in subsequent statements:
FROM ducklink_load('aba');
SELECT aba_validate('021000021'); -- true
A set of system views makes everything introspectable:
- ducklink.modules — the full catalog, with a
loadedflag - ducklink.functions — every function with its full SQL signature
- ducklink.capabilities — what this host build supports
- ducklink.cache — the local component cache
- ducklink.versions — module generations and compatibility
On Linux and macOS an advanced tier also enables a LOAD WASM '<name>'
statement — an explicit, sandbox-aware alternative to ducklink_load that
signals you are entering the WebAssembly module boundary.
A built-in ducklink_version() scalar is always available, so the
extension is usable and testable before any module is loaded. For
deployments, the DUCKLINK_COMPONENTS environment variable can preload a
fixed set of modules at load time. The same components run unchanged under
the standalone ducklink host (DuckDB-compiled-to-wasm), so one artifact
targets both directions.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| ducklink_version | scalar | NULL | NULL |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
This extension does not add any settings.