title: How to get a release build with debugging information when using cargo?
body: <p>The following command</p>
  
  <pre><code>$ cargo build
  </code></pre>
  
  <p>produces a <strong>non-optimized</strong> build <strong>with</strong> debugging information. On the contrary,</p>
  
  <pre><code>$ cargo build --release
  </code></pre>
  
  <p>produces an <strong>optimized</strong> build <strong>without</strong> debugging information.</p>
  
  <p>Is there a way of producing an <strong>optimized</strong> build <strong>with</strong> debugging information? I need this to get meaningful profiling information.</p>