cargo feature unification turned on a dependency I didn't want
Our workspace has two crates. The main binary depends on reqwest with default features off plus rustls-tls. A library crate in the same workspace pulls in reqwest with default-features = true, which drags in native-tls and OpenSSL. On our Ubuntu 22.04 CI box that means installing libssl-dev and it still fails:
error: failed to run custom build command for openssl-sys v0.9.102
Caused by: package 'openssl' was not found
I thought features were per-crate. Why is cargo enabling native-tls for my binary?
4 replies