Skip to content

Commit 28af235

Browse files
committed
arm linux support
1 parent a29379a commit 28af235

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.github/workflows/release-cli.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818
- target: x86_64-unknown-linux-musl
1919
os: ubuntu-latest
2020
name: linux-x86_64
21+
- target: aarch64-unknown-linux-musl
22+
os: ubuntu-latest
23+
name: linux-aarch64
2124
- target: aarch64-apple-darwin
2225
os: macos-latest
2326
name: darwin-aarch64
@@ -28,17 +31,28 @@ jobs:
2831
steps:
2932
- uses: actions/checkout@v4
3033

31-
- name: Install musl tools (Linux)
34+
- name: Install musl tools (Linux x86_64)
3235
if: matrix.target == 'x86_64-unknown-linux-musl'
3336
run: |
3437
sudo apt-get update
3538
sudo apt-get install -y musl-tools
3639
40+
- name: Install musl tools (Linux aarch64)
41+
if: matrix.target == 'aarch64-unknown-linux-musl'
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu
45+
3746
- name: Install Rust
3847
uses: dtolnay/rust-toolchain@stable
3948
with:
4049
targets: ${{ matrix.target }}
4150

51+
- name: Configure cross-compilation (Linux aarch64)
52+
if: matrix.target == 'aarch64-unknown-linux-musl'
53+
run: |
54+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
55+
4256
- name: Build
4357
run: cargo build --release --target ${{ matrix.target }}
4458

@@ -102,6 +116,7 @@ jobs:
102116
echo "### CLI Binaries" >> release_notes.md
103117
echo "- \`pg0-darwin-aarch64\` - macOS Apple Silicon" >> release_notes.md
104118
echo "- \`pg0-linux-x86_64\` - Linux x86_64 (statically linked, works on any Linux distribution)" >> release_notes.md
119+
echo "- \`pg0-linux-aarch64\` - Linux ARM64/aarch64 (statically linked, works on any Linux distribution)" >> release_notes.md
105120
echo "- \`pg0-windows-x86_64.exe\` - Windows x64" >> release_notes.md
106121
echo "" >> release_notes.md
107122
echo "### Bundled Components" >> release_notes.md

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Includes **pgvector** for AI/vector workloads out of the box.
99
- **Zero dependencies** - single binary, no installation required
1010
- **Embedded PostgreSQL 16** with pgvector pre-installed
1111
- **Multiple instances** - run multiple PostgreSQL servers simultaneously
12-
- Works on macOS (Apple Silicon), Linux (x86_64, statically linked), and Windows (x64)
12+
- Works on macOS (Apple Silicon), Linux (x86_64 & ARM64, statically linked), and Windows (x64)
1313
- Bundled `psql` client - no separate installation needed
1414
- Data persists between restarts
1515

install.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ detect_platform() {
3232

3333
# Validate supported platforms (must have pgvector pre-compiled)
3434
case "$platform" in
35-
darwin-aarch64|linux-x86_64|windows-x86_64)
35+
darwin-aarch64|linux-x86_64|linux-aarch64|windows-x86_64)
3636
;;
3737
darwin-x86_64)
3838
echo -e "${YELLOW}Note: Intel Mac users can run the Apple Silicon binary via Rosetta 2${NC}"
3939
platform="darwin-aarch64"
4040
;;
4141
*)
4242
echo -e "${RED}Unsupported platform: ${platform}${NC}"
43-
echo "Supported platforms: darwin-aarch64 (macOS Apple Silicon), linux-x86_64, windows-x86_64"
43+
echo "Supported platforms: darwin-aarch64 (macOS Apple Silicon), linux-x86_64, linux-aarch64, windows-x86_64"
4444
exit 1
4545
;;
4646
esac
@@ -108,7 +108,6 @@ main() {
108108

109109
echo ""
110110
echo "pg0 is now available."
111-
pg0 -h
112111
}
113112

114113
main "$@"

0 commit comments

Comments
 (0)