From aba5ff8d9b78fc52206f632d3ba19bc8a444e419 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Tue, 28 Jun 2022 11:44:38 -0400 Subject: [PATCH] Tech review comments for chapter 1 --- nostarch/chapter01.md | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/nostarch/chapter01.md b/nostarch/chapter01.md index 62034af3b..540822648 100644 --- a/nostarch/chapter01.md +++ b/nostarch/chapter01.md @@ -80,12 +80,9 @@ On Windows, go to *https://www.rust-lang.org/tools/install* and follow the instructions for installing Rust. At some point in the installation, you’ll receive a message explaining that you’ll also need the MSVC build tools for Visual Studio 2013 or later. - - + To acquire the build tools, you’ll need to install Visual Studio 2022 - - from *https://visualstudio.microsoft.com/downloads/*. When asked which workloads to install, include: @@ -128,13 +125,12 @@ you out. Other great resources include the Users forum at *https://users.rust-lang.org/* and Stack Overflow at *https://stackoverflow.com/questions/tagged/rust*. + + ### Updating and Uninstalling Once Rust is installed via `rustup`, when a new version of Rust is released, updating to the latest version is - - easy. From your shell, run the following update script: ``` @@ -222,10 +218,6 @@ Listing 1-1: A program that prints `Hello, world!` Save the file and go back to your terminal window in the *~/projects/hello_world* directory. On Linux or macOS, enter the following commands to compile and run the file: - - ``` $ rustc main.rs @@ -495,6 +487,12 @@ path. Most people use `cargo run` instead, which is what we show in a few paragraphs. We talk about building for release mode in the next section; do you think it needs to be mentioned here too? I think it would be somewhat distracting and repetitive to get into that right here... /Carol --> + + directory. You can run the executable with this command: ``` @@ -528,6 +526,7 @@ laboriousness. The idea was to show `cargo build`, talk about where the result of that ends up, then show that `cargo run` does those two steps in one command. Do you think that works or does this section need to be reordered somehow? /Carol --> + Notice that this time we didn’t see output indicating that Cargo was compiling `hello_cargo`. Cargo figured out that the files hadn’t changed, so it didn’t @@ -594,6 +593,9 @@ With simple projects, Cargo doesn’t provide a lot of value over just using With complex projects composed of multiple crates, it’s much easier to let Cargo coordinate the build. + + Even though the `hello_cargo` project is simple, it now uses much of the real tooling you’ll use in the rest of your Rust career. In fact, to work on any existing projects, you can use the following commands to check out the code @@ -622,3 +624,6 @@ This is a great time to build a more substantial program to get used to reading and writing Rust code. So, in Chapter 2, we’ll build a guessing game program. If you would rather start by learning how common programming concepts work in Rust, see Chapter 3 and then return to Chapter 2. + + \ No newline at end of file