From e6f5383b0ec8bc37e52779664a86db34ff1fbb5a Mon Sep 17 00:00:00 2001 From: Dominick Schroer Date: Wed, 21 Aug 2024 15:45:26 -0400 Subject: [PATCH 1/3] move modules from kebab-case to snake_case --- src/doc/src/guide/project-layout.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/doc/src/guide/project-layout.md b/src/doc/src/guide/project-layout.md index c4360af019c..de6413c10cb 100644 --- a/src/doc/src/guide/project-layout.md +++ b/src/doc/src/guide/project-layout.md @@ -11,24 +11,24 @@ Cargo [package][def-package]: │   ├── lib.rs │   ├── main.rs │   └── bin/ -│ ├── named-executable.rs -│      ├── another-executable.rs -│      └── multi-file-executable/ +│ ├── named_executable.rs +│      ├── another_executable.rs +│      └── multi_file_executable/ │      ├── main.rs │      └── some_module.rs ├── benches/ -│   ├── large-input.rs -│   └── multi-file-bench/ +│   ├── large_input.rs +│   └── multi_file_bench/ │   ├── main.rs │   └── bench_module.rs ├── examples/ │   ├── simple.rs -│   └── multi-file-example/ +│   └── multi_file_example/ │   ├── main.rs │   └── ex_module.rs └── tests/ - ├── some-integration-tests.rs - └── multi-file-test/ + ├── some_integration_tests.rs + └── multi_file_test/ ├── main.rs └── test_module.rs ``` From e31e4306830e11ba377459c56371bdc7bc559676 Mon Sep 17 00:00:00 2001 From: Dominick Schroer Date: Thu, 22 Aug 2024 08:34:36 -0400 Subject: [PATCH 2/3] Revert "move modules from kebab-case to snake_case" This reverts commit e6f5383b0ec8bc37e52779664a86db34ff1fbb5a. --- src/doc/src/guide/project-layout.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/doc/src/guide/project-layout.md b/src/doc/src/guide/project-layout.md index de6413c10cb..c4360af019c 100644 --- a/src/doc/src/guide/project-layout.md +++ b/src/doc/src/guide/project-layout.md @@ -11,24 +11,24 @@ Cargo [package][def-package]: │   ├── lib.rs │   ├── main.rs │   └── bin/ -│ ├── named_executable.rs -│      ├── another_executable.rs -│      └── multi_file_executable/ +│ ├── named-executable.rs +│      ├── another-executable.rs +│      └── multi-file-executable/ │      ├── main.rs │      └── some_module.rs ├── benches/ -│   ├── large_input.rs -│   └── multi_file_bench/ +│   ├── large-input.rs +│   └── multi-file-bench/ │   ├── main.rs │   └── bench_module.rs ├── examples/ │   ├── simple.rs -│   └── multi_file_example/ +│   └── multi-file-example/ │   ├── main.rs │   └── ex_module.rs └── tests/ - ├── some_integration_tests.rs - └── multi_file_test/ + ├── some-integration-tests.rs + └── multi-file-test/ ├── main.rs └── test_module.rs ``` From c2e6f8439525bfc70837da1597bbf1b41414f29b Mon Sep 17 00:00:00 2001 From: Dominick Schroer Date: Thu, 22 Aug 2024 08:42:17 -0400 Subject: [PATCH 3/3] call out binaries vs modules in naming --- src/doc/src/guide/project-layout.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doc/src/guide/project-layout.md b/src/doc/src/guide/project-layout.md index c4360af019c..330eeeb36fb 100644 --- a/src/doc/src/guide/project-layout.md +++ b/src/doc/src/guide/project-layout.md @@ -48,6 +48,8 @@ files, place a `main.rs` file along with the extra [*modules*][def-module] within a subdirectory of the `src/bin`, `examples`, `benches`, or `tests` directory. The name of the executable will be the directory name. +Binaries, examples, benches and integration tests follow `kebab-case` naming style. Modules within those targets are `snake_case` following the [Rust standard](https://rust-lang.github.io/rfcs/0430-finalizing-naming-conventions.html). + You can learn more about Rust's module system in [the book][book-modules]. See [Configuring a target] for more details on manually configuring targets.