title: How do I specify features for a sub-dependency in Cargo?
body: <p>I'm working on a CLI app that uses reqwest and self_update. self_update also uses reqwest. I want my app to use rustls and not pull in openssl dependencies. Cargo.toml allows <a href="https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features" rel="noreferrer">choosing features</a> of dependencies:</p>
  
  <pre><code>[dependencies.reqwest]
  version = "0.10"
  default-features = false
  features = ["rustls-tls", "json", "blocking"]
  </code></pre>
  
  <p>It would be cool if sub-dependencies worked:</p>
  
  <pre><code>[dependencies.self_update.reqwest]
  version = "0.10"
  default-features = false
  features = ["rustls-tls", "json", "blocking"]
  </code></pre>
  
  <p>I also looked at <a href="https://doc.rust-lang.org/cargo/reference/manifest.html#the-replace-section" rel="noreferrer">replace section</a>, but only something like this works where I branch the code:</p>
  
  <pre><code>"reqwest:0.10.1" = { branch = "rustls", git = "https://github.com/ctaggart/reqwest" }
  </code></pre>
  
  <p>But what I want is default-features and features supported too:</p>
  
  <pre><code>"reqwest:0.10.1" = { tag="v0.10.1", git = "https://github.com/seanmonstar/reqwest", default-features = false, features = ["rustls-tls", "json", "blocking"] }
  </code></pre>
  
  <p>How do I configure the features of Reqwest or Tokio or any other highly configurable non-direct dependency using Cargo?</p>