From 4716b4edb30c7bd6ff370c71dbb59256f2ab38e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Thu, 8 Feb 2024 11:21:23 +0100 Subject: [PATCH] docs: add README for every chapters --- README.md | 3 ++- .../README.md | 1 + chapter_12_minigrep/README.md | 2 +- chapter_13_iterators_and_closures/README.md | 1 + chapter_14_cargo_and_crates/README.md | 24 +++++++++++++++++++ chapter_2_guessing_game/README.md | 1 + chapter_3_common_concepts/README.md | 1 + chapter_4_ownership/README.md | 1 + chapter_5_structs/README.md | 1 + chapter_6_enums/README.md | 1 + chapter_8_common_collections/README.md | 1 + chapter_9_error_handling/README.md | 1 + 12 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 chapter_10_generics_traits_lifetimes/README.md create mode 100644 chapter_13_iterators_and_closures/README.md create mode 100644 chapter_14_cargo_and_crates/README.md create mode 100644 chapter_2_guessing_game/README.md create mode 100644 chapter_3_common_concepts/README.md create mode 100644 chapter_4_ownership/README.md create mode 100644 chapter_5_structs/README.md create mode 100644 chapter_6_enums/README.md create mode 100644 chapter_8_common_collections/README.md create mode 100644 chapter_9_error_handling/README.md diff --git a/README.md b/README.md index 80ca06a..c49cd6e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Rust keeps track of who can read and write to memory. It knows when the program - [Website](https://www.rust-lang.org/) - Local Documentation: `rustup doc` -- Rust version used: v1.74.0 (`rustc --version`) +- Rust version used: v1.75.0 (`rustc --version`) ## Summary @@ -31,3 +31,4 @@ Rust keeps track of who can read and write to memory. It knows when the program 11. [Testing](./chapter_11_testing) 12. [An I/O Project: Building a Command Line Program: `minigrep`](./chapter_12_minigrep) 13. [Functional Language Features: Iterators and Closures](./chapter_13_iterators_and_closures) +14. [More About Cargo and Crates.io](./chapter_14_cargo_and_crates) diff --git a/chapter_10_generics_traits_lifetimes/README.md b/chapter_10_generics_traits_lifetimes/README.md new file mode 100644 index 0000000..233b170 --- /dev/null +++ b/chapter_10_generics_traits_lifetimes/README.md @@ -0,0 +1 @@ +# 10. Generic Types, Traits, and Lifetimes diff --git a/chapter_12_minigrep/README.md b/chapter_12_minigrep/README.md index 8150b09..3c3e996 100644 --- a/chapter_12_minigrep/README.md +++ b/chapter_12_minigrep/README.md @@ -1,4 +1,4 @@ -# An I/O Project: Building a Command Line Program: `minigrep` +# 12. An I/O Project: Building a Command Line Program: `minigrep` Command line tool that interacts with file and command line input/output to practice some of the Rust concepts we've learned so far. diff --git a/chapter_13_iterators_and_closures/README.md b/chapter_13_iterators_and_closures/README.md new file mode 100644 index 0000000..39b7d09 --- /dev/null +++ b/chapter_13_iterators_and_closures/README.md @@ -0,0 +1 @@ +# 13. Functional Language Features: Iterators and Closures diff --git a/chapter_14_cargo_and_crates/README.md b/chapter_14_cargo_and_crates/README.md new file mode 100644 index 0000000..c6e58ca --- /dev/null +++ b/chapter_14_cargo_and_crates/README.md @@ -0,0 +1,24 @@ +# 14. More About Cargo and Crates.io + +## Customizing Builds with Release Profiles + +=> Release profiles are predefined and customizable profiles with different configurations that allow a programmer to have more control over various options for compiling code. + +Cargo has 2 main profiles: + +- `dev`: for development (used by default with `cargo build`) +- `release`: for release (used with `cargo build --release`) + +We can customize the `release` profile by adding a section to the `Cargo.toml` file: + +```toml +[profile.dev] +opt-level = 0 + +[profile.release] +opt-level = 3 +``` + +## Publishing a Crate to Crates.io + +Packages can be published to [crates.io](https://crates.io/), the Rust community’s package registry. diff --git a/chapter_2_guessing_game/README.md b/chapter_2_guessing_game/README.md new file mode 100644 index 0000000..288b9d8 --- /dev/null +++ b/chapter_2_guessing_game/README.md @@ -0,0 +1 @@ +# 2. Programming a Guessing Game diff --git a/chapter_3_common_concepts/README.md b/chapter_3_common_concepts/README.md new file mode 100644 index 0000000..63387ed --- /dev/null +++ b/chapter_3_common_concepts/README.md @@ -0,0 +1 @@ +# 3. Common Programming Concepts diff --git a/chapter_4_ownership/README.md b/chapter_4_ownership/README.md new file mode 100644 index 0000000..cf9cbba --- /dev/null +++ b/chapter_4_ownership/README.md @@ -0,0 +1 @@ +# 4. Understanding Ownership diff --git a/chapter_5_structs/README.md b/chapter_5_structs/README.md new file mode 100644 index 0000000..6d38d1e --- /dev/null +++ b/chapter_5_structs/README.md @@ -0,0 +1 @@ +# 5. Using Structs to Structure Related Data diff --git a/chapter_6_enums/README.md b/chapter_6_enums/README.md new file mode 100644 index 0000000..86b5f1c --- /dev/null +++ b/chapter_6_enums/README.md @@ -0,0 +1 @@ +# 6. Enums and Pattern Matching diff --git a/chapter_8_common_collections/README.md b/chapter_8_common_collections/README.md new file mode 100644 index 0000000..a768c8a --- /dev/null +++ b/chapter_8_common_collections/README.md @@ -0,0 +1 @@ +# 8. Common Collections diff --git a/chapter_9_error_handling/README.md b/chapter_9_error_handling/README.md new file mode 100644 index 0000000..c290828 --- /dev/null +++ b/chapter_9_error_handling/README.md @@ -0,0 +1 @@ +# 9. Error Handling