Skip to content

Fix aarch64 cross-compile: switch reqwest to rustls-tls - #11

Merged
zackkitzmiller merged 1 commit into
mainfrom
fix/rustls-tls-cross-compile
Jun 13, 2026
Merged

Fix aarch64 cross-compile: switch reqwest to rustls-tls#11
zackkitzmiller merged 1 commit into
mainfrom
fix/rustls-tls-cross-compile

Conversation

@zackkitzmiller

Copy link
Copy Markdown
Member

Problem

The release workflow cross-compiles to aarch64-unknown-linux-gnu via cross, and the build fails:

Could not find openssl via pkg-config
The system library `openssl` required by crate `openssl-sys` was not found.

reqwest's default default-tls feature uses native-tlsopenssl-sys, which needs a system OpenSSL that isn't present in the cross build environment for the target arch.

Fix

Switch reqwest to rustls-tls (pure-Rust TLS, no system dependency). openssl-sys is now entirely absent from the dependency tree, so every target — including aarch64 — builds without a system OpenSSL.

Because this requires default-features = false, the other reqwest defaults (charset, http2, system-proxy) are re-listed explicitly so behavior is otherwise unchanged.

Verification

  • cargo tree -i openssl-sys → no match (removed)
  • cargo tree -i rustls → present via hyper-rustls/reqwest
  • 277 tests pass, clippy clean (host x86_64)

Note: TLS to api.anthropic.com / the local proxy is unaffected — rustls handles standard HTTPS. Worth one cross-build of aarch64 on this PR to confirm the release matrix is green.

The default reqwest TLS backend (native-tls) pulls in openssl-sys,
which requires a system OpenSSL that isn't present when the release
workflow cross-compiles to aarch64-unknown-linux-gnu, failing the
build. Switch to rustls-tls (pure Rust) so no system library is
needed on any target. Defaults charset/http2/system-proxy are
re-enabled explicitly since default-features is now off.
@zackkitzmiller
zackkitzmiller merged commit c8ec7d8 into main Jun 13, 2026
1 check passed
@zackkitzmiller
zackkitzmiller deleted the fix/rustls-tls-cross-compile branch June 13, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant