11## Package Layout
22
33Cargo uses conventions for file placement to make it easy to dive into a new
4- Cargo package:
4+ Cargo [ package] [ def-package ] :
55
66``` text
77.
@@ -44,9 +44,9 @@ Cargo package:
4444* Integration tests go in the ` tests ` directory.
4545
4646If a binary, example, bench, or integration test consists of multiple source
47- files, place a ` main.rs ` file along with the extra modules within a
48- subdirectory of the ` src/bin ` , ` examples ` , ` benches ` , or ` tests ` directory.
49- The name of the executable will be the directory name.
47+ files, place a ` main.rs ` file along with the extra [ * modules* ] [ def-module ]
48+ within a subdirectory of the ` src/bin ` , ` examples ` , ` benches ` , or ` tests `
49+ directory. The name of the executable will be the directory name.
5050
5151You can learn more about Rust's module system in [ the book] [ book-modules ] .
5252
@@ -56,4 +56,6 @@ automatically infers target names.
5656
5757[ book-modules ] : ../../book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html
5858[ Configuring a target ] : ../reference/cargo-targets.md#configuring-a-target
59+ [ def-package ] : ../appendix/glossary.md#package ' "package" (glossary entry) '
60+ [ def-module ] : ../appendix/glossary.md#module ' "module" (glossary entry) '
5961[ Target auto-discovery ] : ../reference/cargo-targets.md#target-auto-discovery
0 commit comments