Skip to content

fix(release): vendor OpenSSL for linux-musl and aarch64-linux cross builds#28

Merged
rekurt merged 1 commit into
masterfrom
fix/vendored-tls-cross-compile
May 5, 2026
Merged

fix(release): vendor OpenSSL for linux-musl and aarch64-linux cross builds#28
rekurt merged 1 commit into
masterfrom
fix/vendored-tls-cross-compile

Conversation

@rekurt

@rekurt rekurt commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

The release workflow for tag v0.2.0 failed on x86_64-unknown-linux-musl and aarch64-unknown-linux-gnu because openssl-sys (pulled in transitively via native-tls / postgres-native-tls / mysql_async) could not locate target-side OpenSSL during cross-compilation.

  • Add optional vendored-tls feature → activates openssl/vendored so openssl-sys statically builds OpenSSL from source via openssl-src. Cargo's feature unification means every transitive openssl-sys consumer benefits.
  • Pass --features vendored-tls only for the two cross targets that need it; native-host targets keep the fast path.
  • Set CC_<target> env so openssl-src picks the correct cross C compiler.
  • Bump version to 0.2.1 for re-release.

Run that failed: https://github.com/rekurt/dbdiff/actions/runs/25347211297

Test plan

  • cargo check --locked passes (default features)
  • cargo check --features vendored-tls --locked passes
  • Tag v0.2.1 triggers release workflow with all 6 targets green
  • Release page receives 5 tarballs + 1 zip artifact

🤖 Generated with Claude Code

…uilds

The release workflow failed for x86_64-unknown-linux-musl and
aarch64-unknown-linux-gnu targets because openssl-sys (pulled in
transitively via native-tls / postgres-native-tls / mysql_async)
could not locate a target-side OpenSSL during cross-compilation.

Add an optional `vendored-tls` feature that activates `openssl/vendored`,
making openssl-sys statically build OpenSSL from source via openssl-src.
The feature unifies across the entire dep graph thanks to Cargo's
feature unification, so all transitive openssl-sys consumers benefit.

The release workflow now passes `--features vendored-tls` only for the
two cross targets that need it; native-host targets keep the fast path.
Set CC_<target> env so openssl-src picks the correct cross C compiler.

Bumps version to 0.2.1 for re-release.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rekurt rekurt merged commit 513b76e into master May 5, 2026
1 check failed
@rekurt rekurt deleted the fix/vendored-tls-cross-compile branch May 5, 2026 00:52
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