title: Passing program arguments through Cargo
body: <p>I have some sample code that is currently making use of <a href="https://crates.io/crates/getopts" rel="noreferrer">getopts</a> which is specified as a dependency in <code>Cargo.toml</code></p>
  
  <pre><code>[dependencies]
  getopts = "0.2"
  </code></pre>
  
  <p>However I can not seem to pass argument (<code>-t</code>, <code>--test</code>) through Cargo (e.g. <code>cargo run --test</code>) for obvious reasons.</p>
  
  <p>Since I have specified that external dependency, trying to run <code>rustc src/main.rs --test</code> won't work either:</p>
  
  <pre><code>src/main.rs:2:5: 2:21 error: unresolved import `getopts::Options`. There is no `Options` in `getopts`
  src/main.rs:2 use getopts::Options;
                ^~~~~~~~~~~~~~~~
  error: aborting due to previous error
  </code></pre>
  
  <p>Is there another way to achieve this or some common alternative for the time being?</p>