Hey everyone, I work on PGlite. Excited to see this on HN again. If you have any questions I'll be sure to answer them. We recently crossed a massive usage milestone with over 3M weekly downloads (we're nearly at 4M!) - see https://www.npmjs.com/package/@electric-sql/pglite While we originally built this for embedding into web apps, we have seen enormous growth in devtools and developer environments - both Google Fir…
This looks really interesting...but why WASM-only? Naively it seems like WASM-ification would be a 2nd step, after lib-ification. Obviously missing something...
PGlite – Embeddable Postgres
61–70 of 118 posts
Re: PGlite – Embeddable Postgres
#62Re: PGlite – Embeddable Postgres
#63Earlier quoted context omitted.
If I understand correctly, what this project does is take the actual postgresql sources, which are written in C, compile them to wasm and provide typescript wrappers. So you need the wasm to be able to use the C code from js/ts.
Yes. I would like to use the code as a library from something other than js/ts.
Re: PGlite – Embeddable Postgres
#64https://github.com/electric-sql/pglite/issues/89 makes it sound like there's "third-party" bindings for Rust. Is there any interest in "official" PGLite bindings to other languages?
Re: PGlite – Embeddable Postgres
#65I'd love to to use PGLite in a non-JavaScript runtime. For example, embed PGLite into my Go CLI with a WASM runtime and use PGLite as a replacement for SQLite. https://github.com/electric-sql/pglite/issues/89 makes it sound like there's "third-party" bindings for Rust. Is there any interest in "official" PGLite bindings to other languages?
Re: PGlite – Embeddable Postgres
#66Are people using this in SPA applications with success? I saw on the website that syncing via ElectricSQL is in alpha and that no CRDT is available, afaik. Any other options? Also, I guess pgsql extensions are out of scope? Nonetheless, this could be interesting for data heavy SPA's.
We are not syncing with Electric, but I've heard good things about it.
Re: PGlite – Embeddable Postgres
#67At this point, this should be built into the browser which could fetch signed db data and be extremely performant.
Re: PGlite – Embeddable Postgres
#68Earlier quoted context omitted.
Amazing work! It makes setting up CI so much easier.
huh. could you tell how you use it in ci?
In my case, the focus is on DX ie faster tests. I load shared database from `pglite-schema.tgz` (~1040ms) instead of running migrations from a fresh DB and then use transaction rollback isolation (~10ms per test).
This is a lot faster and more convenient than spinning up a container. Test runs are 5x faster.
I'm hoping to get this working on a python service soon as well (with py-pglite).
Re: PGlite – Embeddable Postgres
#69Hey everyone, I work on PGlite. Excited to see this on HN again. If you have any questions I'll be sure to answer them. We recently crossed a massive usage milestone with over 3M weekly downloads (we're nearly at 4M!) - see https://www.npmjs.com/package/@electric-sql/pglite While we originally built this for embedding into web apps, we have seen enormous growth in devtools and developer environments - both Google Fir…
Does pglite in memory outperform “normal” postgres? If so then supporting the network protocol so it could be run in CI for non-JS languages could be really cool
Re: PGlite – Embeddable Postgres
#70Hey everyone, I work on PGlite. Excited to see this on HN again. If you have any questions I'll be sure to answer them. We recently crossed a massive usage milestone with over 3M weekly downloads (we're nearly at 4M!) - see https://www.npmjs.com/package/@electric-sql/pglite While we originally built this for embedding into web apps, we have seen enormous growth in devtools and developer environments - both Google Fir…
Does pglite in memory outperform “normal” postgres? If so then supporting the network protocol so it could be run in CI for non-JS languages could be really cool