Comment by steveklabnik
6 years ago
A crate is a compilation unit. A package is defined by a Cargo.toml, and can have one or more crates.
Most folks use “package” and “crate” interchangeably, even if they’re technically different.
See the bottom of https://doc.rust-lang.org/book/ch07-00-managing-growing-proj...
(Additionally, “compilation unit” is a bit weird, given incremental compilation, etc. “the file containing the root module tree that gets passed to rustc” is not as succinct though.)
No comments yet
Contribute on Hacker News ↗