fix(release): vendor OpenSSL for linux-musl and aarch64-linux cross builds#28
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The release workflow for tag
v0.2.0failed onx86_64-unknown-linux-muslandaarch64-unknown-linux-gnubecauseopenssl-sys(pulled in transitively vianative-tls/postgres-native-tls/mysql_async) could not locate target-side OpenSSL during cross-compilation.vendored-tlsfeature → activatesopenssl/vendoredsoopenssl-sysstatically builds OpenSSL from source viaopenssl-src. Cargo's feature unification means every transitiveopenssl-sysconsumer benefits.--features vendored-tlsonly for the two cross targets that need it; native-host targets keep the fast path.CC_<target>env soopenssl-srcpicks the correct cross C compiler.0.2.1for re-release.Run that failed: https://github.com/rekurt/dbdiff/actions/runs/25347211297
Test plan
cargo check --lockedpasses (default features)cargo check --features vendored-tls --lockedpassesv0.2.1triggers release workflow with all 6 targets green🤖 Generated with Claude Code