cargo build --bins

Command `cargo build --bin BINS` where bins is space-separated list
of binaries rebuilds only those binaries.

As a side effect, `cargo run --name NAME` now build only binary to
be executed.
@alexcrichton by library you mean external library from another crate? Because current crate library is checked with `extern crate proj` statement in `foo.rs` (if library is not built, `extern crate` doesn't work).