3 ms·
Pgembed is pglite for native code.
by adsharma 6mo ago
Pgembed is pglite for native code.
- nextaccountic 6mo agoWhich one? https://github.com/Ladybug-Memory/pgembed https://github.com/Ladybug-Memory/pgembed or https://github.com/faokunega/pg-embed https://github.com/faokunega/pg-embed ? Both will either download or ship the postgres binary with your app, and run it in a separate process. Pglite is different, it's actually a library (they have stripped some parts of the postgres source code) and it could in principle be ported to be used as a native library (meaning, you link to it and run as a single program) There's even a draft PR to do this, but it became stale https://github.com/electric-sql/pglite/pull/842 https://github.com/electric-sql/pglite/pull/842 Right now what exists is, grabbing the pglite wasm and running it on native code on wasi https://github.com/f0rr0/pglite-oxide https://github.com/f0rr0/pglite-oxide
- trueno 6mo agofrick this gotta be the tenth time ive read about pglite here and i always go look for native library. shame pr became stale, webapps simply arent always my end game. thanks for putting pglite-oxide on my radar tho, this is an interesting almost-there i can tinker with.
- nextaccountic 6mo agoI am always checking out this project too, looking for a native build. I am quite happy that they added support for extensions though
- adsharma 6mo agoThe first one. It's forked from pgserver. Yes, what you get is a multi-server postgres under the covers. But for many users, the convenience of "uv pip install...", auto clean up via context manager is the higher order bit that takes them to SQLite. Of course the bundled extensions are the key differentiator. With enough distribution and market opportunities we (yes, there is a for profit company behind it) can invest in making it truly embedded.
- adsharma 6mo agoExperimenting with the pglite way, this time using vlang here: https://github.com/adsharma/vpg https://github.com/adsharma/vpg v run cmd/vpg_test.v