With these changes I was able to build a working statically linked (musl libc) binary, but I don't know what the tradeoffs between OpenSSL and Rustls-TLS are. We could use conditional compilation if it turns out there are strong reasons to prefer dynamically linked OpenSSL on non-statically linked targets. I would prefer to keep it simple and just use Rustls-TLS everywhere if it works though.
To verify the changes work I targeted x86_64-unknown-linux-musl to produce a statically linked executable (requires clang):
fixes #66
With these changes I was able to build a working statically linked (musl libc) binary, but I don't know what the tradeoffs between OpenSSL and Rustls-TLS are. We could use conditional compilation if it turns out there are strong reasons to prefer dynamically linked OpenSSL on non-statically linked targets. I would prefer to keep it simple and just use Rustls-TLS everywhere if it works though.
To verify the changes work I targeted
x86_64-unknown-linux-musl
to produce a statically linked executable (requiresclang
):(I believe you could also specify
musl-gcc
instead ofclang
as the C compiler if you happen to have that)Reqwest TLS docs: https://docs.rs/reqwest/latest/reqwest/tls/index.html