Skip to content

Commit a712410

Browse files
committed
vendor openssl for musl
1 parent 21f2764 commit a712410

4 files changed

Lines changed: 25 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- target: x86_64-unknown-linux-musl
2525
os: ubuntu-latest
2626
- target: aarch64-unknown-linux-gnu
27-
os: ubuntu-latest
27+
os: ubuntu-24.04-arm
2828

2929
steps:
3030
- uses: actions/checkout@v4
@@ -33,19 +33,22 @@ jobs:
3333
if: matrix.target == 'x86_64-unknown-linux-musl'
3434
run: sudo apt-get update && sudo apt-get install -y musl-tools
3535

36-
- name: Install cross-compilation tools
36+
- name: Install libssl-dev
3737
if: matrix.target == 'aarch64-unknown-linux-gnu'
38-
run: |
39-
sudo apt-get update
40-
sudo apt-get install -y gcc-aarch64-linux-gnu
38+
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
4139

4240
- name: Add Rust target
4341
run: rustup target add ${{ matrix.target }}
4442

4543
- name: Build
46-
env:
47-
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
48-
run: cargo build --release --target ${{ matrix.target }} -p path-cli --bin path
44+
run: |
45+
# musl can't use system libssl (glibc-linked), so it vendors openssl.
46+
# aarch64-gnu now builds natively on an arm runner — system libssl works.
47+
extra=()
48+
if [ "${{ matrix.target }}" = "x86_64-unknown-linux-musl" ]; then
49+
extra=(--features vendored-openssl)
50+
fi
51+
cargo build --release --target ${{ matrix.target }} -p path-cli --bin path "${extra[@]}"
4952
5053
- name: Package
5154
shell: bash

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ toolpath-pi = { version = "0.3.0", path = "crates/toolpath-pi" }
3636
path-cli = { version = "0.8.0", path = "crates/path-cli" }
3737
pathbase-client = { version = "0.1.0", path = "crates/pathbase-client" }
3838

39-
reqwest = { version = "0.13", features = ["blocking", "json"] }
39+
reqwest = { version = "0.13", default-features = false, features = ["blocking", "json", "rustls"] }
4040
serde = { version = "1.0", features = ["derive"] }
4141
serde_json = "1.0"
4242
clap = { version = "4.5", features = ["derive"] }

crates/path-cli/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ toolpath-gemini = { workspace = true }
5757
toolpath-codex = { workspace = true }
5858
toolpath-pi = { workspace = true }
5959

60+
[features]
61+
vendored-openssl = ["git2/vendored-openssl"]
62+
6063
[dev-dependencies]
6164
assert_cmd = "2"
6265
predicates = "3"

0 commit comments

Comments
 (0)