Skip to content

Commit e3b717c

Browse files
committed
Cargo build now builds to /target/debug/, changed the docs to reflect that.
Deleted trailing space in hello-cargo.md Added note about build --release in hello-cargo thanks to steven klabnik for pointing it out for me edited out redundant wording
1 parent 425297a commit e3b717c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/doc/trpl/hello-cargo.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,16 @@ Once you have this file in place, we should be ready to build! Try this:
7878
```bash
7979
$ cargo build
8080
Compiling hello_world v0.0.1 (file:///home/yourname/projects/hello_world)
81-
$ ./target/hello_world
81+
$ ./target/debug/hello_world
8282
Hello, world!
8383
```
8484

8585
Bam! We build our project with `cargo build`, and run it with
86-
`./target/hello_world`. This hasn't bought us a whole lot over our simple use
86+
`./target/debug/hello_world`. This hasn't bought us a whole lot over our simple use
8787
of `rustc`, but think about the future: when our project has more than one
8888
file, we would need to call `rustc` more than once, and pass it a bunch of options to
8989
tell it to build everything together. With Cargo, as our project grows, we can
90-
just `cargo build` and it'll work the right way.
90+
just `cargo build` and it'll work the right way. When you're project is finally ready for release, you can use `cargo build --release` to compile your crates with optimizations.
9191

9292
You'll also notice that Cargo has created a new file: `Cargo.lock`.
9393

@@ -163,4 +163,4 @@ much more in-depth guide to Cargo can be found [here](http://doc.crates.io/guide
163163

164164
Now that you've got the tools down, let's actually learn more about the Rust
165165
language itself. These are the basics that will serve you well through the rest
166-
of your time with Rust.
166+
of your time with Rust.

0 commit comments

Comments
 (0)