[<<][rust][>>][..]
Wed Apr 29 17:15:38 EDT 2020

confused again

package
crate
library
module


As I understand it, a crate can export a [lib] which will be the name
of the crate, but that's not the same as the name of the package.

https://doc.rust-lang.org/book/ch07-01-packages-and-crates.html

- crate is a library or a binary
- a package is a collection of crates
- crates.io contains packages
- Cargo.toml refers to packages

A lot fo the confusion comes from a package containing 0 or 1
libraires, so in most cases package and library can be glossed over as
being the same.  But they are not.  And they can have different names.

I guess this is useful for making drop-in replacements.





[Reply][About]
[<<][rust][>>][..]