@@ -26,7 +26,7 @@ To Cargo-ify our project, we need to do two things: Make a `Cargo.toml`
26
26
configuration file, and put our source file in the right place. Let's
27
27
do that part first:
28
28
29
- ``` { bash}
29
+ ``` bash
30
30
$ mkdir src
31
31
$ mv main.rs src/main.rs
32
32
```
@@ -38,7 +38,7 @@ place for everything, and everything in its place.
38
38
39
39
Next, our configuration file:
40
40
41
- ``` { bash}
41
+ ``` bash
42
42
$ editor Cargo.toml
43
43
```
44
44
@@ -75,7 +75,7 @@ well as what it is named.
75
75
76
76
Once you have this file in place, we should be ready to build! Try this:
77
77
78
- ``` { bash}
78
+ ``` bash
79
79
$ cargo build
80
80
Compiling hello_world v0.0.1 (file:///home/yourname/projects/hello_world)
81
81
$ ./target/hello_world
@@ -113,7 +113,7 @@ can start developing right away.
113
113
114
114
To start a new project with Cargo, use ` cargo new ` :
115
115
116
- ``` { bash}
116
+ ``` bash
117
117
$ cargo new hello_world --bin
118
118
```
119
119
@@ -122,7 +122,7 @@ were making a library, we'd leave it off.
122
122
123
123
Let's check out what Cargo has generated for us:
124
124
125
- ``` { bash}
125
+ ``` bash
126
126
$ cd hello_world
127
127
$ tree .
128
128
.
@@ -138,21 +138,21 @@ manager. It's not necessary, but it's certainly useful.
138
138
139
139
This is all we need to get started. First, let's check out ` Cargo.toml ` :
140
140
141
- ``` { toml}
141
+ ``` toml
142
142
[package ]
143
143
144
144
name = " hello_world"
145
145
version = " 0.0.1"
146
146
authors = [
" Your Name <[email protected] >" ]
147
147
```
148
148
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.
152
152
153
153
Here's what's in ` src/main.rs ` :
154
154
155
- ``` { rust}
155
+ ``` rust
156
156
fn main () {
157
157
println! (" Hello, world!" );
158
158
}
0 commit comments