rb-sys icon indicating copy to clipboard operation
rb-sys copied to clipboard

Additional build-time package dependencies

Open taylorthurlow opened this issue 1 year ago • 6 comments

I'm in need of libssl-dev for cross-compile targets like x86_64-linux, but I don't see any obvious way to include them in the build step.

taylorthurlow avatar Jan 16 '24 06:01 taylorthurlow

For the openssl crate, you should be able to use the vendored feature. Let me know if that works.

ianks avatar Jan 16 '24 15:01 ianks

In this case I have a dependency on jsonschema which, in order to support a particular part of the library, requires me to add a dependency on reqwest with the rustls-tls feature enabled, which requires the SSL libs.

I'm super green on Rust (I live in Ruby land, probably unsurprisingly) - but am I mistaken in thinking that required external package dependencies would be a common issue in this case?

taylorthurlow avatar Jan 17 '24 00:01 taylorthurlow

I'm pretty sure rustls would not require the ssl libs at all, since it's a pure rust dependency... either way, if you add:

openssl = { version = "*", features = ["vendored"] }

that will make it so the ssl libs are always vendored for all deps.

ianks avatar Jan 17 '24 03:01 ianks

Looking at the gem now, try native-tls-vendored as well

ianks avatar Jan 17 '24 03:01 ianks

Also, you may be able to use rustls still, i think you would need to set default-features = false on reqwest (otherwise it will try to use openssl)

sorry for the spam

ianks avatar Jan 17 '24 04:01 ianks

Feel free to take a look at the failed action run if you are interested in the build failure. 3 of the 6 build targets failed, I rolled back the dependency change and things were back to normal.

Regardless, though, I appreciate the suggestions, I will give them a try.

taylorthurlow avatar Jan 17 '24 08:01 taylorthurlow