title: How can I make running a Cargo build script optional?
body: <p>I have a Rust project that generates a dynamic (cdylib) library. The project uses a <a href="https://crates.io/crates/cbindgen" rel="nofollow noreferrer">cbindgen</a> build script to create an according C header file, matching the exported functions of the library. <code>Cargo.toml</code> looks like this:</p>
  
  <pre><code>[package]
  name = "example"
  version = "0.1.0"
  authors = ["Me &lt;me@foo.bar&gt;"]
  build = "build.rs"
  
  [lib]
  name = "example"
  crate-type = ["cdylib"]
  
  [dependencies]
  
  [build-dependencies]
  cbindgen = "0.6.2"
  </code></pre>
  
  <p>Unfortunately RLS (Rust Language Server) doesn't work very well when the build script is active which makes editing in VS Code rather unpleasant. Is there a way to make running the build script optional, having it disabled by default and only manually enable it when requested on the command-line (i.e. something like <code>cargo build --release --enable-build-scripts</code>)?</p>