Skip to content

Commit d702e02

Browse files
committed
build: vendor openssl so the CLI cross-compiles cleanly
cargo-zigbuild for aarch64-unknown-linux-gnu failed at openssl-sys because pkg-config can't find target-arch openssl headers, and we can't easily provide them outside the workspace. The transitive pull is: iroh -> pkarr -> reqwest 0.13 (default features = "default-tls") -> hyper-tls -> native-tls -> openssl-sys reqwest 0.13 ships from pkarr's lockfile with native-tls included. Patching iroh/pkarr to switch reqwest features isn't on our path; the workspace's own reqwest 0.12 dep is unrelated (and adding default-features = false there doesn't reach the 0.13 instance — they're separate version-graph nodes). Add `openssl = { version = "0.10", features = ["vendored"] }` to the CLI. Cargo feature unification enables the vendored build for the transitive openssl-sys, so cross-compiling no longer needs target-arch system headers — openssl gets compiled from source as part of the build. Static link, no runtime libssl/libcrypto dependency. Verified: native check passes, aarch64-unknown-linux-gnu cross-build via cargo-zigbuild produces a valid 251MB unstripped ARM aarch64 ELF.
1 parent e5232a8 commit d702e02

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

Cargo.lock

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

cli/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,11 @@ hex.workspace = true
2525
sentry.workspace = true
2626
rustls = { workspace = true, features = ["ring"] }
2727
inquire = "0.9.4"
28-
reqwest.workspace = true
28+
reqwest.workspace = true
29+
# Bring in openssl with the `vendored` feature so cross-compiles (e.g.
30+
# cargo-zigbuild for aarch64-linux/apple) build openssl from source
31+
# instead of needing target-arch system headers. The dep is transitively
32+
# pulled by iroh's pkarr -> reqwest 0.13 (default features include
33+
# native-tls); we can't disable that without patching iroh, so we
34+
# vendor instead.
35+
openssl = { version = "0.10", features = ["vendored"] }

0 commit comments

Comments
 (0)