[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112552":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":29,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},112552,"electric-pglite","neondatabase\u002Felectric-pglite","neondatabase","Embeddable Postgres with real-time, reactive bindings.","https:\u002F\u002Fpglite.dev",null,"TypeScript",16358,482,64,119,0,1,79,88,7,98.85,"Apache License 2.0",false,"main",[26,27,28],"database","postgres","wasm","2026-11-23 13:21:35","2026-11-23 19:42:13","\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fpglite.dev\" target=\"_blank\">\n    \u003Cpicture>\n      \u003Csource media=\"(prefers-color-scheme: dark)\"\n          srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Felectric-sql\u002Fpglite\u002Fmain\u002Fdocs\u002Fpublic\u002Fimg\u002Fbrand\u002Flogo.svg\"\n      \u002F>\n      \u003Csource media=\"(prefers-color-scheme: light)\"\n          srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Felectric-sql\u002Fpglite\u002Fmain\u002Fdocs\u002Fpublic\u002Fimg\u002Fbrand\u002Flogo-light.svg\"\n      \u002F>\n      \u003Cimg alt=\"PGlite logo\"\n          src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Felectric-sql\u002Fpglite\u002Fmain\u002Fdocs\u002Fpublic\u002Fimg\u002Fbrand\u002Flogo-light.svg\"\n      \u002F>\n    \u003C\u002Fpicture>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fpglite.dev\">PGlite\u003C\u002Fa> - the WASM build of Postgres from \u003Ca href=\"https:\u002F\u002Felectric.ax\" target=\"_blank\">Electric\u003C\u002Fa>.\u003Cbr>\n  Build reactive, realtime, local-first apps directly on Postgres.\n\u003Cp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpglite\u002Fstargazers\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Felectric-sql\u002Fpglite?style=social&label=Star\" \u002F>\u003C\u002Fa>\n  \u003C!-- \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpglite\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpglite\u002Fworkflows\u002FCI\u002Fbadge.svg\" alt=\"CI\">\u003C\u002Fa> -->\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpglite\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache_2.0-green\" alt=\"License - Apache 2.0\">\u003C\u002Fa>\n  \u003Ca href=\"#roadmap\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fstatus-alpha-orange\" alt=\"Status - Alpha\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.electric-sql.com\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F933657521581858818?color=5969EA&label=discord\" alt=\"Chat - Discord\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fx.com\u002FElectricSQL\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fnestframework.svg?style=social&label=Follow%20@ElectricSQL\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Ffosstodon.org\u002F@electric\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fmastodon\u002Ffollow\u002F109599644322136925.svg?domain=https%3A%2F%2Ffosstodon.org\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n# PGlite - Postgres in WASM\n\n![PGlite](https:\u002F\u002Fraw.githubusercontent.com\u002Felectric-sql\u002Fpglite\u002Fmain\u002Fscreenshot.png)\n\nPGlite is a WASM Postgres build packaged into a TypeScript client library that enables you to run Postgres in the browser, Node.js, Bun and Deno, with no need to install any other dependencies. It is only 3mb gzipped and has support for many Postgres extensions, including [pgvector](https:\u002F\u002Fgithub.com\u002Fpgvector\u002Fpgvector) and [PostGIS](https:\u002F\u002Fpostgis.net).\n\n```javascript\nimport { PGlite } from \"@electric-sql\u002Fpglite\";\n\nconst db = new PGlite();\nawait db.query(\"select 'Hello world' as message;\");\n\u002F\u002F -> { rows: [ { message: \"Hello world\" } ] }\n```\n\nIt can be used as an ephemeral in-memory database, or with persistence either to the file system (Node\u002FBun\u002FDeno) or indexedDB (Browser).\n\nUnlike previous \"Postgres in the browser\" projects, PGlite does not use a Linux virtual machine - it is simply Postgres in WASM.\n\nFor full documentation and user guides see [pglite.dev](https:\u002F\u002Fpglite.dev).\n\n## Browser\n\nIt can be installed and imported using your usual package manager:\n\n```js\nimport { PGlite } from \"@electric-sql\u002Fpglite\";\n```\nor using a CDN such as JSDeliver:\n\n```js\nimport { PGlite } from \"https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002F@electric-sql\u002Fpglite\u002Fdist\u002Findex.js\";\n```\n\nThen for an in-memory Postgres:\n\n```js\nconst db = new PGlite()\nawait db.query(\"select 'Hello world' as message;\")\n\u002F\u002F -> { rows: [ { message: \"Hello world\" } ] }\n```\n\nor to persist the database to indexedDB:\n\n```js\nconst db = new PGlite(\"idb:\u002F\u002Fmy-pgdata\");\n```\n\n## Node\u002FBun\u002FDeno\n\nInstall into your project:\n\n**NodeJS**\n\n```bash\nnpm install @electric-sql\u002Fpglite\n```\n\n**Bun**\n\n```bash\nbun install @electric-sql\u002Fpglite\n```\n\n**Deno**\n\n```bash\ndeno add npm:@electric-sql\u002Fpglite\n```\n\nTo use the in-memory Postgres:\n\n```javascript\nimport { PGlite } from \"@electric-sql\u002Fpglite\";\n\nconst db = new PGlite();\nawait db.query(\"select 'Hello world' as message;\");\n\u002F\u002F -> { rows: [ { message: \"Hello world\" } ] }\n```\n\nor to persist to the filesystem:\n\n```javascript\nconst db = new PGlite(\".\u002Fpath\u002Fto\u002Fpgdata\");\n```\n\n## pg (node-postgres)\n\nSince `v0.5.13`, PGlite exposes a connection object that you can directly pass to `pg` ([node-postgres](https:\u002F\u002Fgithub.com\u002Fbrianc\u002Fnode-postgres)) modules (clients):\n\n```javascript\nimport { createPgConfig } from '@electric-sql\u002Fpglite\u002Fnode-postgres'\nimport { Client, Pool } from 'pg'\nimport Cursor from 'pg-cursor'\n\n\u002F\u002F use with pg Client\nconst pgConfig1 = createPgConfig()\nconst client = new Client(pgConfig1)\nawait client.connect()\nawait client.query(`\n  CREATE TABLE IF NOT EXISTS test (\n    id SERIAL PRIMARY KEY,\n    name TEXT\n  );\n`)\n\n\u002F\u002F or with Pool\nconst pgConfig2 = createPgConfig()\nconst pool = new Pool(pgConfig2)\nconst conn = await pool.connect()\n\nawait conn.query(`\n  CREATE TABLE IF NOT EXISTS test (\n    id SERIAL PRIMARY KEY,\n    name TEXT\n  );\n`)\n\n\u002F\u002F or even with Cursor from pg-cursor\nconst cursor = client.query(new Cursor('SELECT * FROM items;'))\n\n```\n\n## How it works\n\nPostgreSQL typically operates using a process forking model; whenever a client initiates a connection, a new process is forked to manage that connection. However, programs compiled with Emscripten - a C to WebAssembly (WASM) compiler - cannot fork new processes, and operates strictly in a single-process mode. As a result, PostgreSQL cannot be directly compiled to WASM for conventional operation.\n\nFortunately, PostgreSQL includes a \"single user mode\" primarily intended for command-line usage during bootstrapping and recovery procedures. Building upon this capability, PGlite introduces an input\u002Foutput pathway that facilitates interaction with PostgreSQL when it is compiled to WASM within a JavaScript environment.\n\n## Limitations\n\n- PGlite is single user\u002Fconnection.\n\n## How to build PGlite and contribute\n\nThe build process of PGlite is split into two parts:\n\n1. Building the Postgres WASM module.\n2. Building the PGlite client library and other TypeScript packages.\n\nDocker is required to build the WASM module, along with Node (v20 or above) and [pnpm](https:\u002F\u002Fpnpm.io\u002F) for package management and building the TypeScript packages.\n\nTo start checkout the repository and install dependencies:\n\n```bash\ngit clone --recurse-submodules https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpglite\ncd pglite\npnpm install\n```\n\nTo build everything, we have the convenient `pnpm build:all` command in the root of the repository. This command will:\n\n1. Use Docker to build the Postgres WASM module. The artifacts produced by this step are then copied to `\u002Fpackages\u002Fpglite\u002Frelease`.\n2. Build the PGlite client library and other TypeScript packages.\n\nTo _only_ build the Postgres WASM module (i.e. point 1 above), run\n\n```bash\npnpm wasm:build\n```\n\nIf you don't want to build the WASM module and assorted WASM binaries from scratch, they are generated automatically on Github after each successful PR merge. You can download the latest binaries by going to the last successfully merged PR and clicking the link after the comment _Interim build files:_. Extract the files and place them under `packages\u002Fpglite\u002Frelease` in your local repo copy.\n\nTo build all TypeScript packages (i.e. point 2 of the above), run:\n\n```bash\npnpm ts:build\n```\n\nThis will build all packages in the correct order based on their dependency relationships. You can now develop any individual package using the `build` and `test` scripts, as well as the `stylecheck` and `typecheck` scripts to ensure style and type validity.\n\nOr alternatively to build a single package, move into the package directory and run:\n\n```bash\ncd packages\u002Fpglite\npnpm build\n```\n\nWhen ready to open a PR, run the following command at the root of the repository:\n```bash\npnpm changeset\n```\nAnd follow the instructions to create an appropriate changeset. Please ensure any contributions that touch code are accompanied by a changeset.\n\n## Acknowledgments\n\nPGlite builds on the work of [Stas Kelvich](https:\u002F\u002Fgithub.com\u002Fkelvich) of [Neon](https:\u002F\u002Fneon.tech) in this [Postgres fork](https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpostgres-pglite).\n\n## Sponsors\n\nBig shoutout to everybody supporting us!\n\n### Blacksmith\n\n\u003Ca href=\"https:\u002F\u002Fblacksmith.sh\">\n  \u003Cimg src=\".\u002Fdocs\u002Fimg\u002Fblacksmith-logo-white-on-black.svg\" width=\"350px\"\u002F>\n\u003C\u002Fa>\n\n## License\n\nPGlite is dual-licensed under the terms of the [Apache License 2.0](https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpglite\u002Fblob\u002Fmain\u002FLICENSE) and the [PostgreSQL License](https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpglite\u002Fblob\u002Fmain\u002FPOSTGRES-LICENSE), you can choose which you prefer.\n\nChanges to the [Postgres source](https:\u002F\u002Fgithub.com\u002Felectric-sql\u002Fpostgres-pglite) are licensed under the PostgreSQL License.\n","PGlite 是一个基于 WebAssembly 的嵌入式 PostgreSQL 实现，可直接在浏览器、Node.js、Bun 或 Deno 中运行完整 Postgres 引擎。核心功能包括轻量级（3MB gzipped）、支持 pgvector 和 PostGIS 等扩展、本地持久化（IndexedDB\u002F文件系统）及实时响应式数据绑定能力。技术特点是纯 WASM 构建，无需虚拟机或外部依赖，提供标准 PostgreSQL SQL 接口与 TypeScript 原生集成。适用于本地优先（local-first）、离线优先、单页应用内嵌数据库、原型验证及边缘端数据同步等场景。",2,"2026-11-24 04:43:48","top_language"]