Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build static MUSL target with vendored openssl #8

Merged
merged 1 commit into from
Sep 17, 2022

Conversation

sempervictus
Copy link

Rust is capable of building binaries which carry their own MUSL
libc internally for operation on almost any userspace provided that
the kernel ABI (signals and such) is compatible with the platform
target selected.
This project runs into OpenSSL dependency problems when building a
MUSL target as the host libraries are generally built for GNU.
Address the concern by providing a vendored openssl, which permits
building for the target via cargo build --features vendored with
the relevant release and target/toolchain invocation.

Testing:
This patch is applied to our internal PKGBUILD, producing working
binaries.

Rust is capable of building binaries which carry their own MUSL
libc internally for operation on almost any userspace provided that
the kernel ABI (signals and such) is compatible with the platform
target selected.
This project runs into OpenSSL dependency problems when building a
MUSL target as the host libraries are generally built for GNU.
Address the concern by providing a vendored openssl, which permits
building for the target via `cargo build --features vendored` with
the relevant release and target/toolchain invocation.

Testing:
  This patch is applied to our internal PKGBUILD, producing working
binaries.
@rtyler
Copy link
Owner

rtyler commented Aug 30, 2021

@sempervictus thanks for the pull request, would going full rustls be more useful? (not that I have any problems with the pull request as written, just curious)

@rtyler rtyler self-requested a review August 30, 2021 23:53
@sempervictus
Copy link
Author

Apologies - this fell through the cracks.
Yes, IMO its always better to have native code vs farming out to C libs. That said, it can be an unpleasant lift to convert if you have dependencies bringing in the C libraries.

@rtyler rtyler merged commit 787650c into rtyler:main Sep 17, 2022
@sempervictus
Copy link
Author

Thanks

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.

None yet

2 participants