Crate

A crate is a compilation unit in Rust. This means, if a crate depends on other crates, the dependencies don't need to be recompiled when the root crate changes. However, it's not possible to compile only a part of a crate.

A crate can have multiple targets. For example, it can include multiple binaries, examples, tests, benchmarks and at most one library. How multiple targets are defined with Cargo is explained in the Cargo book.

Crates can be published on Crates.io, which makes it easier for other crates to depend on them.