PostgREST in WebAssembly ?
Discussed in https://github.com/PostgREST/postgrest/discussions/2353
Originally posted by nileshtrivedi June 28, 2022 Has anyone tried porting PostgREST to WASM binary format? This opens the possibility of deploying PostgREST on edge cloud infra like Deno.com - which can be a lot more convenient and cost-effective.
I'm not familiar with Haskell ecosystem. I couldn't find any discussions about WASM in Stack repo.
Related news https://www.tweag.io/blog/2024-11-21-ghc-wasm-th-ghci/
Slightly less related https://github.com/electric-sql/pglite
I imagine running pglite + postgrest in a demo app for our docs entirely in the user's browser.. :thinking:
pglite
I believe pglite doesn't use libpq and has a special way of connecting to the db (ref). I think that we need to support exporting our Plan/Query modules as libraries then convert them to WASM somehow to use postgREST in pglite.