{"id":13508603,"url":"https://github.com/duckdb/duckdb-wasm","last_synced_at":"2025-05-13T17:10:36.412Z","repository":{"id":36972395,"uuid":"368257515","full_name":"duckdb/duckdb-wasm","owner":"duckdb","description":"WebAssembly version of DuckDB","archived":false,"fork":false,"pushed_at":"2025-05-12T10:21:38.000Z","size":80189,"stargazers_count":1574,"open_issues_count":136,"forks_count":151,"subscribers_count":37,"default_branch":"main","last_synced_at":"2025-05-13T02:11:49.525Z","etag":null,"topics":["analytics","browser","database","javascript","node","olap","sql","typescript","webassembly"],"latest_commit_sha":null,"homepage":"https://shell.duckdb.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duckdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-17T16:46:10.000Z","updated_at":"2025-05-12T09:15:06.000Z","dependencies_parsed_at":"2023-10-13T09:26:41.841Z","dependency_job_id":"7135ee9d-2955-43d5-9ecf-ed05250ff657","html_url":"https://github.com/duckdb/duckdb-wasm","commit_stats":{"total_commits":2779,"total_committers":40,"mean_commits":69.475,"dds":0.5109751709247932,"last_synced_commit":"e13d096823f26ade88e2b908b7c91911606c7d2a"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duckdb%2Fduckdb-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duckdb%2Fduckdb-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duckdb%2Fduckdb-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duckdb%2Fduckdb-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duckdb","download_url":"https://codeload.github.com/duckdb/duckdb-wasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990468,"owners_count":21995774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","browser","database","javascript","node","olap","sql","typescript","webassembly"],"created_at":"2024-08-01T02:00:55.510Z","updated_at":"2025-05-13T17:10:31.396Z","avatar_url":"https://github.com/duckdb.png","language":"TypeScript","funding_links":[],"categories":["C++","browser","Data Munging","Data \u0026 Analytics","\u003ca name=\"C%2B%2B\"\u003e\u003c/a\u003eC++"],"sub_categories":["Analytics \u0026 Feature Flags"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cpicture\u003e\n         \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/duckdb/duckdb-wasm/main/misc/duckdb_wasm.svg\"\u003e\n         \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/duckdb/duckdb-wasm/main/misc/duckdb_wasm_light.svg\"\u003e\n         \u003cimg alt=\"The DuckDB WASM logo.\" src=\"https://raw.githubusercontent.com/duckdb/duckdb-wasm/main/misc/duckdb_wasm.svg\" height=\"80\"\u003e\n      \u003c/picture\u003e\n  \u003ch1\u003eDuckDB-Wasm\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@duckdb/duckdb-wasm/v/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@duckdb/duckdb-wasm?logo=npm\" alt=\"duckdb-wasm package on NPM\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/duckdb/duckdb-wasm/actions\"\u003e\n    \u003cimg src=\"https://github.com/duckdb/duckdb-wasm/actions/workflows/main.yml/badge.svg?branch=main\" alt=\"Github Actions Badge\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://discord.duckdb.org\"\u003e\n    \u003cimg src=\"https://shields.io/discord/909674491309850675\" alt=\"Join Discord\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/duckdb/duckdb/releases/\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/duckdb/duckdb?color=brightgreen\u0026display_name=tag\u0026logo=duckdb\u0026logoColor=white\" alt=\"Latest DuckDB Release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.jsdelivr.com/package/npm/@duckdb/duckdb-wasm\"\u003e\n    \u003cimg src=\"https://data.jsdelivr.com/v1/package/npm/@duckdb/duckdb-wasm/badge?style=rounded\" alt=\"jsdeliver stats\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003ch1\u003e\u003c/h1\u003e\n\n[DuckDB](https://duckdb.org) is an in-process SQL OLAP Database Management System.\n\nDuckDB-Wasm brings DuckDB to every browser thanks to WebAssembly.\n\nDuckdb-Wasm speaks Arrow fluently, reads Parquet, CSV and JSON files backed by Filesystem APIs or HTTP requests and has been tested with Chrome, Firefox, Safari and Node.js. Learn more about DuckDB-Wasm from our [VLDB publication](https://www.vldb.org/pvldb/vol15/p3574-kohn.pdf) or the [recorded talk](https://www.youtube.com/watch?v=wm82b7PlM6s).\n\nTry it out at [shell.duckdb.org](https://shell.duckdb.org) or [external third party embedding of DuckDB-Wasm](https://github.com/davidgasquez/awesome-duckdb?tab=readme-ov-file#web-clients), read the [API documentation](https://shell.duckdb.org/docs/modules/index.html), check out the [web-app examples](https://github.com/duckdb-wasm-examples), and chat with us on [Discord](https://discord.duckdb.org).\n\n## DuckDB and DuckDB-Wasm\n\nDuckDB-Wasm is currently based on DuckDB v1.2.0.\n\nRelevant differences:\n* HTTP stack is different between native and Wasm versions of DuckDB. Most relevant are:\n    * Requests are always upgraded to HTTPS\n    * Requests needs server to allow Cross Origin access on a given resource\n    * File system implementation (eg. S3) is different and this might cause some differences\n* Extension install is lazy, meaning that `INSTALL extension_name FROM 'https://repository.endpoint.org';` defer fetching the extension to the first `LOAD extension_name;` instruction. `INSTALL x FROM community;` shorthands are also supported.\n* DuckDB-Wasm builds are optimized for download speed. Core extensions like autocomplete, JSON, Parquet and ICU are usually bundled DuckDB binaries, while in duckdb-wasm they are autoloaded (including fetching them) at runtime. In particular for ICU autoloading do not work corrently in all cases, explicit `LOAD icu;` might be needed to reproduce same behaviour.\n* DuckDB-Wasm is sandboxed and migth not have the same level of support for out-of-core operations and access to file system\n* DuckDB-Wasm default mode is single threaded. Multithreading is at the moment still experimental.\n\nSupported DuckDB features:\n* DuckDB databases files are compatible to be read from DuckDB-Wasm.\n* Databases files can be made available as simple as: `ATTACH 'https://blobs.duckdb.org/data/test.db'; FROM db.t;` [demo](https://shell.duckdb.org/#queries=v0,ATTACH-'https%3A%2F%2Fblobs.duckdb.org%2Fdata%2Ftest.db'-as-db~,FROM-db.t~)\n* Spatial support via `LOAD spatial` [spatial demo](https://shell.duckdb.org/#queries=v0,%20%20-Spatial-extension-for-geospatial-support%0AINSTALL-spatial~%0ALOAD-spatial~,CREATE-TABLE-stations-AS%0A----FROM-'s3%3A%2F%2Fduckdb%20blobs%2Fstations.parquet'~,%20%20-What-are-the-top%203-closest-Intercity-stations%0A%20%20-using-aerial-distance%3F%0ASELECT%0A----s1.name_long-AS-station1%2C%0A----s2.name_long-AS-station2%2C%0A----ST_Distance(%0A--------ST_Point(s1.geo_lng%2C-s1.geo_lat)%2C%0A--------ST_Point(s2.geo_lng%2C-s2.geo_lat)%0A----)-*-111139-AS-distance%0AFROM-stations-s1%2C-stations-s2%0AWHERE-s1.type-LIKE-'%25Intercity%25'%0A--AND-s2.type-LIKE-'%25Intercity%25'%0A--AND-s1.id-%3C-s2.id%0AORDER-BY-distance-ASC%0ALIMIT-3~)\n* A growing subset of extensions, either core, community or external, are supported for DuckDB-Wasm\n* Multithreading work but it's still experimental and by default not enabled\n\n## DuckDB-Wasm and DuckDB Extension\n\nDuckDB is extensible and this allows to delegate functionality to [extensions](https://duckdb.org/docs/extensions/overview).\n\nCore extensions are available at https://extensions.duckdb.org, and community extensions are available at https://community-extensions.duckdb.org.\n```sql\n--- Excplicitly load extensions\nLOAD icu;\n\n--- Or have them autoloaded when using relevant functions or settings\nDESCRIBE FROM read_parquet('https://blobs.duckdb.org/stations.parquet');  -- (this autoloads JSON)\n\n--- Or register extensions\nINSTALL h3 FROM community;\nINSTALL sqlite_scanner FROM 'https://extensions.duckdb.org';\nINSTALL quack FROM 'https://community-extensions.duckdb.org';\n\n--- And then load them\nLOAD h3;\nLOAD sqlite_scanner;\nLOAD quack;\n```\n\n```sql\nFROM duckdb_extensions() WHERE loaded;\n```\nWill show that h3, icu, parquet, quack and sqlite_scanner have been loaded.\n\nYou can try the [Shell demo with loading of extensions](https://shell.duckdb.org/#queries=v0,%20%20%20-Explicitly-load-extensions%0ALOAD-icu~%0A%0A%20%20%20-Or-have-them-autoloaded-when-using-relevant-functions-or-settings%0ADESCRIBE-FROM-read_parquet('https%3A%2F%2Fblobs.duckdb.org%2Fstations.parquet')~--%20%20-(this-autoloads-parquet)%0A%0A%20%20%20-Or-register-extensions%0AINSTALL-h3-FROM-community~%0AINSTALL-sqlite_scanner-FROM-'https%3A%2F%2Fextensions.duckdb.org'~%0AINSTALL-quack-FROM-'https%3A%2F%2Fcommunity%20extensions.duckdb.org'~%0A%0A%20%20%20-And-then-load-them%3A%0ALOAD-h3~%0ALOAD-sqlite_scanner~%0ALOAD-quack~,FROM-duckdb_extensions()-WHERE-loaded~) but this do require about 3.2 MB of compressed Wasm files to be transfered over the network (on first visit, caching might help).\n\nExtension sizes will vary depending, among other things, on provided functionality or toolchain used.\n\n\n## Build from source\n\n```shell\ngit clone https://github.com/duckdb/duckdb-wasm.git\ncd duckdb-wasm\ngit submodule init\ngit submodule update\nmake apply_patches\nmake serve\n```\n\n## Repository Structure\n\n| Subproject                                               | Description    | Language   |\n| -------------------------------------------------------- | :------------- | :--------- |\n| [duckdb_wasm](/lib)                                      | Wasm Library   | C++        |\n| [@duckdb/duckdb-wasm](/packages/duckdb-wasm)             | Typescript API | Typescript |\n| [@duckdb/duckdb-wasm-shell](/packages/duckdb-wasm-shell) | SQL Shell      | Rust       |\n| [@duckdb/duckdb-wasm-app](/packages/duckdb-wasm-app)     | GitHub Page    | Typescript |\n| [@duckdb/react-duckdb](/packages/react-duckdb)           | React Hooks    | Typescript |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckdb%2Fduckdb-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduckdb%2Fduckdb-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckdb%2Fduckdb-wasm/lists"}