"crates" or "packages" which is the correct word to indicate programs uploaded to crates.io

It seems that cargo and crates io use "crates" and "packages" interchangeably. For example, crates io says "Rust package registry". cargo package generates a *.crate file that seems a package (because it can contain some bin crates).

According to this document, a crate is a compilation unit for rustc and a package is a unit for cargo. None of them are uploading/downloading unit.
How do you say "the stuff published to crates io"? I guess it is a package because something like cargo-edit distributes some bin crates cargo-add, cargo-rm etc.

I would refer to library packages which package a single crate as either packages or crates interchangeably. Probably prefering 'crates', though either works.

With binary things like cargo-edit, I guess it's most correct to call cargo-edit a package and cargo-add, cargo-rm crates? That feels wrong but I can't think of a reason it wouldn't be right.

1 Like

There was supposed to be a distinction that never happened: a package was meant to be able to hold multiple crates.

Currently they're the same thing.

A Cargo.toml defines a package. That's why it starts with [package]. Packages are what are published to crates.io.

The filename ends with .crate because historically, we have not been good about maintaining this distinction. People say either, and it's pretty obvious what you mean, generally.


Thank you for your answers. I decided I'm going not to care these wording.