{"repo":"electric-sql/pglite","free":true,"listed":false,"github":"https://github.com/electric-sql/pglite","clone":"git clone https://github.com/electric-sql/pglite.git","description":"Embeddable Postgres with real-time, reactive bindings.","language":"TypeScript","stars":15843,"topics":["database","postgres","wasm"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"PGlite - the WASM build of Postgres from Electric . Build reactive, realtime, local-first apps directly on Postgres. PGlite - Postgres in WASM PGlite 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 and PostGIS. It can be used as an ephemeral in-memory database, or with persistence either to the file system (Node/Bun/Deno) or indexedDB (Browser). Unlike previous \"Postgres in the browser\" projects, PGlite does not use a Linux virtual machine - it is simply Postgres in WASM. For full documentation and user guides see pglite.dev. Browser It can be installed and imported using your usual package manager: or using a CDN such as JSDeliver: Then for an in-memory Postgres: or to persist the database to indexedDB: Node/Bun/Deno Install into your project: NodeJS Bun Deno To use the in-memory Postgres: or to persist to the filesystem: How it works PostgreSQL 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. Fortunately, PostgreSQL in","default_branch":null,"files":null,"tree":[],"storefront":"/r/electric-sql","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/electric-sql/pglite/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}