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
Which one? https://github.com/Ladybug-Memory/pgembed or 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
Right now what exists is, grabbing the pglite wasm and running it on native code on wasi
https://github.com/f0rr0/pglite-oxide