@@ -26,7 +26,7 @@ To Cargo-ify our project, we need to do two things: Make a `Cargo.toml`
2626configuration file, and put our source file in the right place. Let's
2727do that part first:
2828
29- ``` { bash}
29+ ``` bash
3030$ mkdir src
3131$ mv main.rs src/main.rs
3232```
@@ -38,7 +38,7 @@ place for everything, and everything in its place.
3838
3939Next, our configuration file:
4040
41- ``` { bash}
41+ ``` bash
4242$ editor Cargo.toml
4343```
4444
@@ -75,7 +75,7 @@ well as what it is named.
7575
7676Once you have this file in place, we should be ready to build! Try this:
7777
78- ``` { bash}
78+ ``` bash
7979$ cargo build
8080 Compiling hello_world v0.0.1 (file:///home/yourname/projects/hello_world)
8181$ ./target/hello_world
@@ -113,7 +113,7 @@ can start developing right away.
113113
114114To start a new project with Cargo, use ` cargo new ` :
115115
116- ``` { bash}
116+ ``` bash
117117$ cargo new hello_world --bin
118118```
119119
@@ -122,7 +122,7 @@ were making a library, we'd leave it off.
122122
123123Let's check out what Cargo has generated for us:
124124
125- ``` { bash}
125+ ``` bash
126126$ cd hello_world
127127$ tree .
128128.
@@ -138,21 +138,21 @@ manager. It's not necessary, but it's certainly useful.
138138
139139This is all we need to get started. First, let's check out ` Cargo.toml ` :
140140
141- ``` { toml}
141+ ``` toml
142142[package ]
143143
144144name = " hello_world"
145145version = " 0.0.1"
146146authors = [" Your Name <you@example.com>" ]
147147```
148148
149- Cargo has populated this file with reasonable defaults based off the arguments
150- you gave it and your Git global config . You may notice that Cargo has also initialized
151- the ` hello_world ` directory as a Git repository.
149+ Cargo has populated this file with reasonable defaults based off the arguments you gave
150+ it and your ` git ` global configuration . You may notice that Cargo has also initialized
151+ the ` hello_world ` directory as a ` git ` repository.
152152
153153Here's what's in ` src/main.rs ` :
154154
155- ``` { rust}
155+ ``` rust
156156fn main () {
157157 println! (" Hello, world!" );
158158}
0 commit comments