hyper-tls icon indicating copy to clipboard operation
hyper-tls copied to clipboard

Make tokio dependency optional if possible

Open detly opened this issue 4 years ago • 1 comments

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?

detly avatar Aug 29 '21 02:08 detly

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

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

gosp avatar Oct 07 '22 01:10 gosp