Interface BrowserDriverOptionsExperimental

Options for constructing the browser (duckdb-wasm) driver.

interface BrowserDriverOptions {
    bundle?: {
        mainModule: string;
        mainWorker: string;
        pthreadWorker?: string;
    };
    extensionRepository?: string;
    filesystem?: {
        allowFullHttpReads?: boolean;
        reliableHeadRequests?: boolean;
    };
    loadSpatial?: boolean;
    logLevel?:
        | "DEBUG"
        | "INFO"
        | "WARNING"
        | "ERROR"
        | "NONE";
    preloadExtensions?: readonly string[];
    signal?: AbortSignal;
}

Properties

bundle?: {
    mainModule: string;
    mainWorker: string;
    pthreadWorker?: string;
}

Explicit CDN/base bundle to instantiate. When omitted, the default jsDelivr bundles that ship with @duckdb/duckdb-wasm are selected by duckdb.selectBundle(getJsDelivrBundles()). Supply this in bundler setups that self-host the .wasm + worker assets.

extensionRepository?: string

Optional self-hosted DuckDB extension repository base URL.

filesystem?: {
    allowFullHttpReads?: boolean;
    reliableHeadRequests?: boolean;
}

Browser filesystem policy. Set allowFullHttpReads: false to fail closed when range I/O is unavailable.

loadSpatial?: boolean

Load DuckDB's spatial extension. Disable when bbox covering columns are sufficient. Defaults to true.

logLevel?:
    | "DEBUG"
    | "INFO"
    | "WARNING"
    | "ERROR"
    | "NONE"

Log level passed to the duckdb-wasm ConsoleLogger. Defaults to WARNING.

preloadExtensions?: readonly string[]

Extensions to install and load before use (for example parquet).

signal?: AbortSignal

Cancels driver initialization and synchronously terminates any worker already created.