summaryrefslogtreecommitdiffstats
path: root/src/doc/rust-by-example/src/cargo/deps.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:28 +0000
commit94a0819fe3a0d679c3042a77bfe6a2afc505daea (patch)
tree2b827afe6a05f3538db3f7803a88c4587fe85648 /src/doc/rust-by-example/src/cargo/deps.md
parentAdding upstream version 1.64.0+dfsg1. (diff)
downloadrustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.tar.xz
rustc-94a0819fe3a0d679c3042a77bfe6a2afc505daea.zip
Adding upstream version 1.66.0+dfsg1.upstream/1.66.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/doc/rust-by-example/src/cargo/deps.md21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/doc/rust-by-example/src/cargo/deps.md b/src/doc/rust-by-example/src/cargo/deps.md
index 8913e9e38..85f223f98 100644
--- a/src/doc/rust-by-example/src/cargo/deps.md
+++ b/src/doc/rust-by-example/src/cargo/deps.md
@@ -11,8 +11,8 @@ To create a new Rust project,
# A binary
cargo new foo
-# OR A library
-cargo new --lib foo
+# A library
+cargo new --lib bar
```
For the rest of this chapter, let's assume we are making a binary, rather than
@@ -21,14 +21,19 @@ a library, but all of the concepts are the same.
After the above commands, you should see a file hierarchy like this:
```txt
-foo
-├── Cargo.toml
-└── src
- └── main.rs
+.
+├── bar
+│ ├── Cargo.toml
+│ └── src
+│ └── lib.rs
+└── foo
+ ├── Cargo.toml
+ └── src
+ └── main.rs
```
-The `main.rs` is the root source file for your new project -- nothing new there.
-The `Cargo.toml` is the config file for `cargo` for this project (`foo`). If you
+The `main.rs` is the root source file for your new `foo` project -- nothing new there.
+The `Cargo.toml` is the config file for `cargo` for this project. If you
look inside it, you should see something like this:
```toml