Rust code organization
About
I've read the Managing Growing Projects with Packages, Crates and Modules from the rust book a dozen times now but I always forget the details of it.
Hopefully building a diagram will connect me to this group of rust-enabled neurons faster.
Diagram
Targets
The chapter does not cover targets, but I think it was used interchangeably with the crate concept in section 7.1 when it's mentioned that binary and library crates share the same name.
I ran a small experiment with with both src/main.rs and src/lib.rs to see if the crates could reference each other using the same crate name. Only the binary crate could reference the library crate by the package name.
It would make sense that the documentation meant the name field in targets, considering how closely they are related.
Cargo packages consist of targets which correspond to source files which can be compiled into a crate.