rust-lang/rfcs — pull request #403 by alexcrichton (2014-10-16 15:54:13+00:00)
Title: RFC: Overhaul Cargo's build command support

This RFC is targeted at overhauling the `build` command in Cargo manifests to be
more robust and fully functional for building and linking native code. While
largely targeted at Cargo, this RFC includes a few minor changes to the compiler
itself, hence posting this RFC in this repository.

The high level summary of this RFC is:

1. Instead of having the `build` command be some form of script, it will be a
rust command instead
2. Establish a namespace of `foo-sys` packages which represent the native
library `foo`. These packages will have Cargo-based dependencies between
`*-sys` packages to express dependencies among C packages themselves.
3. Establish a set of standard environment variables for build commands which
will instruct how `foo-sys` packages should be built in terms of dynamic or
static linkage, as well as providing the ability to override where a package
comes from via environment variables.