Skip to content

Commit 0582421

Browse files
committed
auto merge of #15693 : steveklabnik/rust/guide_fix_cargo, r=cmr
Cargo now comes with Rust!
2 parents efbbb51 + 1675339 commit 0582421

File tree

1 file changed

+6
-53
lines changed

1 file changed

+6
-53
lines changed

src/doc/guide.md

+6-53
Original file line numberDiff line numberDiff line change
@@ -279,59 +279,12 @@ program doesn't have any dependencies, so we'll only be using the first part of
279279
its functionality. Eventually, we'll add more. Since we started off by using
280280
Cargo, it'll be easy to add later.
281281

282-
Let's convert Hello World to Cargo. The first thing we need to do to begin using Cargo
283-
is to install Cargo. To do this, we need to build it from source. There are no binaries
284-
yet.
285-
286-
First, let's go back to our projects directory. We don't want Cargo to
287-
live in our project!
288-
289-
```{bash}
290-
$ cd ..
291-
```
292-
293-
Next, we need these commands:
294-
295-
```{bash}
296-
$ git clone --recursive https://github.com/rust-lang/cargo
297-
$ cd cargo
298-
$ make
299-
$ make install # may need sudo or admin permissions
300-
```
301-
302-
The `--recursive` downloads Cargo's own dependencies. You can't use Cargo to
303-
fetch dependencies until you have Cargo installed! Also, you will need to have
304-
`git` installed. Much of the Rust world assumes `git` usage, so it's a good
305-
thing to have around. Please check out [the git
306-
documentation](http://git-scm.com/book/en/Getting-Started-Installing-Git) for
307-
more on installing `git`.
308-
309-
We hope to give Cargo a binary installer, similar to Rust's own, so that
310-
this will not be necessary in the future.
311-
312-
Let's see if that worked. Try this:
313-
314-
```{bash}
315-
$ cargo
316-
Commands:
317-
build # compile the current project
318-
319-
Options (for all commands):
320-
321-
-v, [--verbose]
322-
-h, [--help]
323-
```
324-
325-
If you see this output when you run `cargo`, congrats! Cargo is working. If
326-
not, please [open an issue](https://github.com/rust-lang/cargo/issues/new) or
327-
drop by the Rust IRC, and we can help you out.
328-
329-
Let's move back into our `hello_world` directory now:
330-
331-
```{bash}
332-
$ cd .. # move back up into projects
333-
$ cd hello_world # move into hello_world
334-
```
282+
Let's convert Hello World to Cargo. The first thing we need to do to begin
283+
using Cargo is to install Cargo. Luckily for us, the script we ran to install
284+
Rust includes Cargo by default. If you installed Rust some other way, you may
285+
want to [check the Cargo
286+
README](https://github.com/rust-lang/cargo#installing-cargo-from-nightlies)
287+
for specific instructions about installing it.
335288

336289
To Cargo-ify our project, we need to do two things: Make a `Cargo.toml`
337290
configuration file, and put our source file in the right place. Let's

0 commit comments

Comments
 (0)