xh icon indicating copy to clipboard operation
xh copied to clipboard

Enable native-tls in release

Open Yamakaky opened this issue 2 years ago • 4 comments

Currently, binaries are built with the default features, which doesn't include native-tls. It would be nice to have it enabled.

Yamakaky avatar Aug 18 '21 09:08 Yamakaky

native-tls is enabled in the Windows and macOS builds.

It's not enabled in the Linux builds because it would use dynamic linking, so you wouldn't be able to run the binary everywhere. The current binary is fully statically linked.

You can get a binary with native-tls on Linux by running cargo install xh --features native-tls. (You might need to install libssl-dev and pkg-config to get it to build, depending on your distro.)

But maybe third-party packages should be built with it, they can make more assumptions.

blyxxyz avatar Aug 18 '21 10:08 blyxxyz

Hum, OK, unlucky. Maybe document this somewhere?

Yamakaky avatar Aug 18 '21 23:08 Yamakaky

Just for the record: The Arch package is built with native-tls and I suppose any other distro's packages should also be built with that option so it's really not that big of an issue on Linux and I agree with upstream's decision here to keep the pre-built binary entirely static.

svenstaro avatar Sep 15 '21 06:09 svenstaro

BTW, if you like to provide statically linked binaries linked against OpenSSL 3, it can be easily done using GitHub Action jirutka/setup-alpine, see this example in the readme. That said I don’t think it’s a good idea to bundle OpenSSL.

jirutka avatar Sep 26 '22 21:09 jirutka