<p align="center">
  <img src="https://raw.githubusercontent.com/Query-farm-haybarn/.github/haybarn/profile/assets/haybarn-icon.png" alt="Haybarn" width="96" height="96">
</p>

# `@haybarn/ext-vgi-h1-5-3-wasm-eh`

WebAssembly (**eh**) build of the **vgi** extension, built against [Haybarn](https://github.com/Query-farm-haybarn/haybarn) **1.5.3** for use with [duckdb-wasm](https://github.com/duckdb/duckdb-wasm).

> **Source:** [https://github.com/query-farm/vgi](https://github.com/query-farm/vgi)

## Why this package

Lets you **bundle / self-host / version-pin** the wasm extension instead of fetching it from the Haybarn CDN at runtime — handy for offline, CSP-restricted, or air-gapped duckdb-wasm apps.

Pick the variant matching the duckdb-wasm bundle your app loads: `mvp`, `eh`, or `threads`.

## Install

```sh
npm install @haybarn/ext-vgi-h1-5-3-wasm-eh
```

## Use it (duckdb-wasm)

Resolve the bundled `.wasm` to a URL and point duckdb-wasm at it. With a bundler (Vite shown; webpack/esbuild use `new URL(..., import.meta.url)`):

```js
import extUrl from '@haybarn/ext-vgi-h1-5-3-wasm-eh/bin/vgi.duckdb_extension.wasm?url';
const conn = await db.connect();
await conn.query(`INSTALL vgi FROM '${extUrl}'`);
await conn.query(`LOAD vgi`);
```

> Exact extension-loading API depends on your duckdb-wasm version; the key point is that `extUrl` is a local, bundler-emitted asset, not a CDN fetch. See the [duckdb-wasm docs](https://github.com/duckdb/duckdb-wasm).

For automatic, native (non-wasm) installs use the meta-package [`@haybarn/ext-vgi-h1-5-3`](https://www.npmjs.com/package/@haybarn/ext-vgi-h1-5-3).

## Trademark

Haybarn is an independent derived distribution of DuckDB published by [Query Farm LLC](https://query.farm). Not affiliated with or endorsed by the DuckDB Foundation. DuckDB is a trademark of the DuckDB Foundation.
