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

OpenSSL requirement from reqwest #336

Closed
jatsrt opened this issue Feb 25, 2019 · 5 comments
Closed

OpenSSL requirement from reqwest #336

jatsrt opened this issue Feb 25, 2019 · 5 comments

Comments

@jatsrt
Copy link

jatsrt commented Feb 25, 2019

0.21.0-pre.2

Reqwest has an optional feature to switch to "rustls-tls". This allows much easier cross compilation. Elastic uses reqwest, but just uses it as is, so it is pulling in hyper-tls, which requires openssl.

I do not beleive(though I could be wrong). That this is something that can be externally changed in cargo. So, the question is, is it possible to enable a passthrough feature that would allow the use of elastic with rustls-tls, or to default for compatibility.

@KodrAus
Copy link
Member

KodrAus commented Feb 25, 2019

Hi @jatsrt 👋

If you add reqwest as a dependency in your Cargo.toml alongside elastic with the rustls-tls feature then it should all work, but I'd also be happy to add a rustls-tls feature to elastic that enabled the same feature in its own reqwest dependency.

@jatsrt
Copy link
Author

jatsrt commented Feb 25, 2019

Tried that, as I already use reqwest for other purposes, didn't work.

[dependencies]
serde = "1.0"
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
serde_derive = "1.0"
elastic = "0.21.0-pre.2"
elastic_derive = "0.21.0-pre.2"

reqwest = {version = "0.9", default_features = false, features=["rustls-tls"]}

@jatsrt
Copy link
Author

jatsrt commented Feb 25, 2019

unless I need to match the version exactly with "~0.9"

@jatsrt jatsrt closed this as completed Feb 25, 2019
@jatsrt jatsrt reopened this Feb 25, 2019
@jatsrt
Copy link
Author

jatsrt commented Feb 25, 2019

OK, no that did not do the trick

serde = "1.0"
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
serde_derive = "1.0"
elastic = "0.21.0-pre.2"
elastic_derive = "0.21.0-pre.2"

reqwest = {version = "~0.9", default_features = false, features=["rustls-tls"]}

@KodrAus
Copy link
Member

KodrAus commented Feb 25, 2019

Ah right, so reqwest uses a default-tls feature that we have to disable before it'll stop compiling openssl, in which case just adding a dependency on reqwest yourself won't be enough.

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

No branches or pull requests

2 participants