Cross compiled program with rustls is extremely slow

I tried swapping out OpenSSL for Rustls in Reqwest and Rusoto so that I can cross compile from macOS to Linux using musl.

That worked, but when I scp the binary to the Linux server and run it there, it is incredibly slow and uses a lot of CPU.

Any ideas why this could be?

How did you compiled your binary? Hopefully $ cargo build --release? In debug build performance is not even a concern for many libraries.


I had done that. I just tried cross compiling again and it actually worked without any issues. Not sure what happened last time...

Thanks though!