PGLite overview
PGLite is a real PostgreSQL engine compiled to WebAssembly that runs entirely in the browser — the foundation for local-first development with Silos.
PGLite is a real PostgreSQL engine compiled to WebAssembly that runs entirely client-side — in a browser tab, with no server. It's an open-source project from ElectricSQL, and Silos uses it for local-first development and the in-browser SQL editor.
Because it's genuine PostgreSQL, you get real SQL semantics — DDL/DML, transactions,
MVCC, PL/pgSQL, views, JSON/JSONB, full-text search — running right where your
app runs, with no network round-trip to a database server.
PGLite is PostgreSQL 16-based
PGLite is built on PostgreSQL 16. The Silos server engine is a PostgreSQL 18 WASM build. They are both real Postgres compiled to WASM, but they are not the same build or version — keep that distinction in mind when you depend on version-specific behavior. For features that differ between PG16 and PG18, the server engine (PG18) is the source of truth for deployed databases.
Why run Postgres in the browser
Local-first development
Prototype a schema and run queries with zero setup — no local Postgres install, no container, no connection.
Same engine class
It's real Postgres, so what you build in the browser maps cleanly to a deployed Silos database.
Instant SQL editor
The Console's SQL editor runs PGLite in-process, so queries execute immediately, client-side.
Offline-capable apps
An app can hold a working Postgres database locally and persist it in the browser.
How it fits with Silos
- Prototype in the browser with PGLite — design tables, write queries, iterate fast.
- Deploy the same schema to a Silos database; the deployed engine is real Postgres (PG18) speaking the standard wire protocol.
- Optionally sync browser data with an edge database — an evolving capability covered in Sync.