Implement flexible target specification

See commit message.
Do we have a story for interacting with `cargo`?