1
1
## Package Layout
2
2
3
3
Cargo uses conventions for file placement to make it easy to dive into a new
4
- Cargo package:
4
+ Cargo [ package] [ def-package ] :
5
5
6
6
``` text
7
7
.
@@ -44,9 +44,9 @@ Cargo package:
44
44
* Integration tests go in the ` tests ` directory.
45
45
46
46
If 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.
50
50
51
51
You can learn more about Rust's module system in [ the book] [ book-modules ] .
52
52
@@ -56,4 +56,6 @@ automatically infers target names.
56
56
57
57
[ book-modules ] : ../../book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html
58
58
[ 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) '
59
61
[ Target auto-discovery ] : ../reference/cargo-targets.md#target-auto-discovery
0 commit comments