Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
# Auxiliary files from local workflows, your preferred editor, etc. should
# be ignored locally using $GIT_DIR/info/exclude or ~/.gitexclude.

# excludes for macOS
**/*.DS_Store

# auto-edited makefiles
src/test/Makefile
src/test/isolation/Makefile

# Global excludes across all subdirectories
*.o
*.obj
Expand Down Expand Up @@ -44,3 +51,9 @@ lib*.pc
/tmp_install/
/portlock/
/dist


# build output symlinks
postgres-pglite
postgresql
postgresql-REL_17_5_WASM
346 changes: 346 additions & 0 deletions libpglite/LIBPGLITE_DESIGN.md

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions mobile-build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# PGLite Mobile Cross-Compile (Android/iOS)

This folder contains scripts to cross-compile PostgreSQL and the PGLite glue for Android (NDK) and iOS (Xcode toolchains), producing prebuilt static libraries and headers consumed by the React Native module.

Artifacts layout (per plan):

- dist/mobile/android/<abi>/{include,lib}
- libpgcore_mobile.a
- libpglite_glue_mobile.a
- dist/mobile/ios/{arm64, x86_64-sim}/{include,lib}
- libpgcore_mobile.a
- libpglite_glue_mobile.a

Notes:

- These scripts are initial scaffolding; you may need to adjust paths (NDK, SDK versions, PG branch) and add additional PG libs to the merge step based on link errors.
- For iOS, consider building an XCFramework for distribution via CocoaPods.

## Nix-based reproducible builds

We provide a Nix flake that sets up the toolchain and host tools (GNU make, android ndk, perl, coreutils, etc.) for reproducible builds.

Prereqs:

- Install Nix (https://nixos.org/download)
- Optional: direnv + use flake (we include .envrc)

Shells:

- Android:
- nix develop .#android
- or build-mobile.sh will enter the shell automatically
- PLATFORM=android ABI=arm64-v8a PG_BRANCH=REL_17_5_WASM ./mobile-build/build-mobile.sh
- iOS (requires Xcode/CLT installed locally):
- iOS not yet working/tested
- nix develop .#ios
- PLATFORM=ios ARCH=arm64 ./build-mobile.sh
Loading