Run WebAssembly component extensions inside DuckDB
Installing and Loading
INSTALL ducklink FROM community;
LOAD ducklink;
Example
-- The extension ships one built-in, so loading works with no component:
LOAD ducklink;
SELECT ducklink_version(); -- e.g. 'ducklink 0.1.0'
-- To expose a component's functions, point ducklink at one or more
-- `duckdb:extension` WebAssembly components via the DUCKLINK_COMPONENTS
-- environment variable BEFORE starting DuckDB, e.g.
-- DUCKLINK_COMPONENTS=isin=/path/to/isin.wasm
-- then every function the component registers becomes callable:
-- LOAD ducklink;
-- SELECT isin_is_valid('US0378331005');
About ducklink
ducklink lets a single, portable WebAssembly component — built once against
the duckdb:extension WIT world — load into DuckDB on any supported platform
without per-platform native builds. The extension embeds wasmtime, loads each
component named in the DUCKLINK_COMPONENTS environment variable (a
:-separated list of name=path entries, read when LOAD ducklink runs),
runs its load() to capture the scalar/table/aggregate functions it
registers, and bridges them into DuckDB's function catalog. A built-in
ducklink_version() scalar is always available so the extension is usable
and testable before any component is configured. 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.