This repository was archived by the owner on Sep 19, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork79
A PostgresQL server running in your browser
License
NotificationsYou must be signed in to change notification settings
snaplet/postgres-wasm
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A PostgreSQL server instance running in a virtual machine running in the browser
by Supabase & Snaplet

Demo • Discord • Snaplet • Supabase
Since we worked on this project, awesome and more usable solutions exist:
- PGlite by ElectricSQL which is a native WASM build of Postgres
- pgmock by Stackframe which is using the same approach as this project, emulating the Postgres server in an x86 emulator
Whilepostgres-wasm
was more of a proof of concept, both the above solutions can be used to run PostgreSQL in the browser or getting in-memory PostgreSQL databases!
cd packages/runtime && npx serve
Go tohttp://localhost:3000 and have fun!
This repo is split into three packages that build up the environment for running PostgreSQL in the browser.
- runtime: The v86 emulator that starts the
buildroot
image - Buildroot: Scripts to build the CPU and memory snapshot run by v86.
- Websockproxy: Networking
- v86 which isthe emulator for running x86 operating systems in the browser, without it none of the following projects would be possible
- crunchydata playground for leading the way and showing the world that it was possible to run PostgreSQL in the browser
- browser-shell which was already way ahead of its time, especially on the filesystem part
- browser-linux for showing us how we can make the pieces fit together
- Websockets Proxy the ingenious workaround that opened up the world forv86 emulators everywhere
About
A PostgresQL server running in your browser
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Contributors9
Uh oh!
There was an error while loading.Please reload this page.