Skip to content

Commit 18f70e3

Browse files
committed
Rollup merge of rust-lang#24495 - nathanl:nathanl-explain-bin-flag, r=steveklabnik
Explain the --bin flag in terms of the difference between shipping binary and library code I'm not sure if my explanation is even quite correct, but as a newbie coming from Ruby, this is my best guess. (In Rubyland, libraries always ship with the source code because there's no other form you can ship. :) )
2 parents 69db64f + a47d7a7 commit 18f70e3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/doc/trpl/hello-cargo.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ To start a new project with Cargo, use `cargo new`:
145145
$ cargo new hello_world --bin
146146
```
147147

148-
We’re passing `--bin` because we're making a binary program: if we were making
149-
a library, we'd leave it off.
148+
We’re passing `--bin` because our goal is to get straight to making an executable application, as opposed to a library. Executables are often called ‘binaries.’ (as in `/usr/bin`, if you’re on a Unix system)
150149

151150
Let's check out what Cargo has generated for us:
152151

0 commit comments

Comments
 (0)