One alternative is to use pglite [1] which is Postgres compiled to WASM. It can act as a sqlite replacement during development, then when you are ready to move to a server model your SQL is already in Postgres format.
[1]: https://pglite.dev/
[1]: https://pglite.dev/
They're considering a native build as well, search term "libpglite".
Though I feel like providing it as a library would work very well initially. Roll a suitable minimal WASM runtime and a WASM blob into a single package, separately for every language.