- mise integration. I manage my tools (Node, Python, Terraform...) with mise. Adding psql to a project should be a one-liner in .mise.toml, not "install PostgreSQL system-wide." - Containers. Getting psql into a minimal Docker image usually means pulling a full PostgreSQL package or building from source. A static binary simplifies this.
What This Provides
Pre-built binaries for: - Fully static Linux (works in scratch containers) - musl-linked variants for Alpine - glibc variants for traditional distros - Native macOS (Intel and Apple Silicon)
All dependencies (OpenSSL, ncurses, readline, zlib) are baked in.
Add to your .mise.toml: [tools] "github:IxDay/psql" = "16.1.0"
Run mise install, done.
Or in a Dockerfile: wget -O- https://github.com/IxDay/psql/releases/download/16.1.0/psql-... | tar -C /usr/local/bin -xzf-
Build System
I used Zig instead of Make/CMake. Cross-compilation works out of the box, and a single build.zig handles all 8 target variants without platform-specific toolchains. Worth a look if you're dealing with painful C cross-compilation.
Side Note
This was also a nice experiment using Claude Code. Most of the Zig build system was written with it—helpful when learning a new language/toolchain.