Rollup merge of #30038 - Carreau:cargo-philosopher, r=steveklabnik

At this point of the book, reader have likely use `cargo new --bin`,
likely 2 times, once if they are lazy. This remind them of the `cargo`
syntax.

I was myself unsure whether it was `cargo create`, `cargo new`, and
whether it would initialize in current working directory or needed a
target.

--

Otherwise thanks, I've been writing rust for a few hours, and likes it so far.
This commit is contained in:
Manish Goregaokar 2015-11-25 09:21:18 +05:30
commit 3f25c5c655

View file

@ -45,8 +45,17 @@ Now, lets imagine this sequence of events:
6. ... ? All the forks are taken, but nobody can eat!
There are different ways to solve this problem. Well get to our solution in
the tutorial itself. For now, lets get started modeling the problem itself.
Well start with the philosophers:
the tutorial itself. For now, lets get started and create a new project with
`cargo`:
```bash
$ cd ~/projects
$ cargo new dining_philosophers --bin
$ cd dining_philosophers
```
Now we can start modeling the problem itself. Well start with the philosophers
in `src/main.rs`:
```rust
struct Philosopher {