@@ -33,7 +33,8 @@ $ mv main.rs src/main.rs
3333```
3434
3535Note that since we're creating an executable, we used ` main.rs ` . If we
36- want to make a library instead, we should use ` lib.rs ` .
36+ want to make a library instead, we should use ` lib.rs ` . This convention is required
37+ for Cargo to successfully compile our projects, but it can be overridden if we wish.
3738Custom file locations for the entry point can be specified
3839with a [ ` [[lib]] ` or ` [[bin]] ` ] [ crates-custom ] key in the TOML file described below.
3940
@@ -62,18 +63,17 @@ version = "0.0.1"
6263authors = [ " Your name <you@example.com>" ]
6364```
6465
65- This file is in the [ TOML] [ toml ] format. Let’s let it explain itself to you:
66+ This file is in the [ TOML] [ toml ] format. TOML is similar to INI, but has some
67+ extra goodies. According to the TOML docs,
6668
6769> TOML aims to be a minimal configuration file format that's easy to read due
6870> to obvious semantics. TOML is designed to map unambiguously to a hash table.
6971> TOML should be easy to parse into data structures in a wide variety of
7072> languages.
7173
72- TOML is very similar to INI, but with some extra goodies.
73-
7474[ toml ] : https://github.com/toml-lang/toml
7575
76- Once you have this file in place, we should be ready to build! Try this :
76+ Once you have this file in place, we should be ready to build! To do so, run :
7777
7878``` bash
7979$ cargo build
@@ -82,7 +82,7 @@ $ ./target/debug/hello_world
8282Hello, world!
8383```
8484
85- Bam! We build our project with ` cargo build ` , and run it with
85+ Bam! We built our project with ` cargo build ` , and ran it with
8686` ./target/debug/hello_world ` . We can do both in one step with ` cargo run ` :
8787
8888``` bash
@@ -103,9 +103,9 @@ Hello, world!
103103```
104104
105105This hasn’t bought us a whole lot over our simple use of ` rustc ` , but think
106- about the future: when our project gets more complex, we would need to do more
106+ about the future: when our project gets more complex, we need to do more
107107things to get all of the parts to properly compile. With Cargo, as our project
108- grows, we can just ` cargo build ` , and it’ll work the right way.
108+ grows, we can just run ` cargo build ` , and it’ll work the right way.
109109
110110When your project is finally ready for release, you can use
111111` cargo build --release ` to compile your project with optimizations.
@@ -118,7 +118,7 @@ name = "hello_world"
118118version = " 0.0.1"
119119```
120120
121- This file is used by Cargo to keep track of dependencies in your application.
121+ The ` Cargo.lock ` file is used by Cargo to keep track of dependencies in your application.
122122Right now, we don’t have any, so it’s a bit sparse. You won't ever need
123123to touch this file yourself, just let Cargo handle it.
124124
0 commit comments