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

Make tokio dependency optional if possible #89

Open
detly opened this issue Aug 29, 2021 · 1 comment
Open

Make tokio dependency optional if possible #89

detly opened this issue Aug 29, 2021 · 1 comment

Comments

@detly
Copy link

detly commented Aug 29, 2021

I tried to use reqwest for making https requests, which means a transitive dependency on hyper, and then this lib for TLS. However despite reqwest's and hyper's tokio dep being optional (I think?), this library appears to unconditionally depend on tokio with default features.

Unfortunately tokio with default features compiles to a binary so big, it will not fit on my embedded device. This is unfortunate, since without it (and using a simpler executor), everything else is pretty lightweight.

I haven't dug very deep into it, but a cursory look suggests that the tokio dependency could be removed or feature gated. Would this be possible?

@gosp
Copy link

gosp commented Oct 7, 2022

Does reqwest = { version = "0.11", default-features = false, features = ["native-tls-crate", "blocking", "json"] } work?

Note: remove hyper-tls dependency using default-features = false

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