Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to Cargo: --bin by default #1166

Closed
steveklabnik opened this issue Feb 13, 2018 · 2 comments
Closed

Changes to Cargo: --bin by default #1166

steveklabnik opened this issue Feb 13, 2018 · 2 comments
Labels
Milestone

Comments

@steveklabnik
Copy link
Member

So rust-lang/cargo#5029 is going to change the default for Cargo. We should make sure the book is accurate. Argh...

@carols10cents
Copy link
Member

$ rg "cargo new" src
src/appendix-04-macros.md
217:$ cargo new hello-world
271:$ cargo new hello-world-derive
460:directory with `cargo new --bin pancakes`. We need to add both `hello-world`

src/ch01-02-hello-world.md
270:$ cargo new hello_cargo --bin
274:We passed the `--bin` argument to `cargo new` because our goal is to make an
284:file. Git is a common version control system. You can change `cargo new` to use
286:`--vcs` flag. Run `cargo new --help` to see the available options.

src/ch02-00-guessing-game-tutorial.md
21:$ cargo new guessing_game --bin
25:The first command, `cargo new`, takes the name of the project (`guessing_game`)
46:As you saw in Chapter 1, `cargo new` generates a “Hello, world!” program for

src/ch03-01-variables-and-mutability.md
11:*variables* in your *projects* directory by using `cargo new --bin variables`.

src/ch07-01-mod-and-the-filesystem.md
18:$ cargo new communicator

src/ch11-01-writing-tests.md
39:$ cargo new adder
60:automatically by `cargo new`</span>

src/ch12-01-accepting-command-line-arguments.md
3:Let’s create a new project with, as always, `cargo new`. We’ll call our project
8:$ cargo new --bin minigrep
22:Right now, the program generated by `cargo new` cannot process arguments we

src/ch14-02-publishing-to-crates-io.md
424:With a unique name, the version, the author details that `cargo new` added

src/ch14-03-cargo-workspaces.md
41:Next, we’ll create the `adder` binary crate by running `cargo new` within the
45:$ cargo new --bin adder
92:$ cargo new add-one

src/ch20-01-single-threaded.md
29:$ cargo new hello --bin

@carols10cents
Copy link
Member

Looks like the spots we need to change to explicitly pass --lib are:

src/appendix-04-macros.md
217:$ cargo new hello-world
271:$ cargo new hello-world-derive

src/ch07-01-mod-and-the-filesystem.md
18:$ cargo new communicator

src/ch11-01-writing-tests.md
39:$ cargo new adder

src/ch14-03-cargo-workspaces.md
92:$ cargo new add-one

We should leave the --bin places the way they are to continue working with Rust 1.21.0 through the version that --bin becomes the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants