title: How can I specify a custom Cargo output directory?
body: <p>I put this in my Cargo.toml</p>
  <pre><code>[build]
  target-dir = &quot;../my-target&quot;
  </code></pre>
  <p>However, Cargo doesn't recognize this key.</p>
  <pre class="lang-none prettyprint-override"><code>cargo run --release --bin my_project
  
  warning: unused manifest key: build
  error: failed to open: /.../project-root/target/releases/.cargo-lock
  
  Caused by:
    Permission denied (os error 13)
  </code></pre>
  <p>The custom target dir with the environment variable works:</p>
  <pre class="lang-none prettyprint-override"><code>CARGO_TARGET_DIR=../my-target cargo run --bin my_project
  </code></pre>
  <p>but how can I specify '../my-target' in Cargo.toml?</p>