[Help Wanted] PostGIS extension
Build postgis for pglite.
https://postgis.net/docs/postgis_installation.html#install_requirements
See branch https://github.com/electric-sql/pglite/tree/tdrz/frontend-try-postgis2
All necessary dependencies are built in that branch (see Dockerfile),and creating postgis.tar.gz is possible with some manual steps (see build-postgis.sh). There is a postgis.test.ts that contains a basic postgis test.
This is work in progress (ie not working)!
Ideally the final binary will contain libstdc++ such that the MAIN_MODULE (ie to pglite.wasm) wouldn't need to contain it.
-Wl,--whole-archive -lstdc++ -Wl,--no-whole-archive
Is this possible with emscripten?
You can now build the project the usual way pnpm build:all and run the tests.
You can also run only the postgis tests by cd packages/pglite and then vitest tests/postgis.test.ts. Currently they are failing with missing symbols. We need a reliable way of extracting the needed symbols as this seems to be one of the issues with this extension.