Skip to content

Commit fd77d9d

Browse files
committed
Auto merge of #6066 - zachlute:project-to-package-docs, r=alexcrichton
Replaced 'project' with 'package' in Cargo documentation. Partial fix for #6056. I tried to make a distinction between places that were talking about Cargo 'projects' vs. a generic concept of a 'project' or a github 'project'. It's entirely possible I was overzealous, so please tell me if some of these changes look dumb.
2 parents 04cec5f + 9c8da17 commit fd77d9d

21 files changed

+90
-90
lines changed

src/doc/src/SUMMARY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
* [Cargo Guide](guide/index.md)
1010
* [Why Cargo Exists](guide/why-cargo-exists.md)
11-
* [Creating a New Project](guide/creating-a-new-project.md)
12-
* [Working on an Existing Project](guide/working-on-an-existing-project.md)
11+
* [Creating a New Package](guide/creating-a-new-project.md)
12+
* [Working on an Existing Package](guide/working-on-an-existing-project.md)
1313
* [Dependencies](guide/dependencies.md)
14-
* [Project Layout](guide/project-layout.md)
14+
* [Package Layout](guide/project-layout.md)
1515
* [Cargo.toml vs Cargo.lock](guide/cargo-toml-vs-cargo-lock.md)
1616
* [Tests](guide/tests.md)
1717
* [Continuous Integration](guide/continuous-integration.md)

src/doc/src/faq.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ even when people use the registry as the primary source of packages.
1313

1414
We think that it’s very important to support multiple ways to download
1515
packages, including downloading from GitHub and copying packages into
16-
your project itself.
16+
your package itself.
1717

1818
That said, we think that [crates.io] offers a number of important benefits, and
1919
will likely become the primary way that people download packages in Cargo.
@@ -46,7 +46,7 @@ languages include:
4646

4747
Yes!
4848

49-
Cargo handles compiling Rust code, but we know that many Rust projects
49+
Cargo handles compiling Rust code, but we know that many Rust packages
5050
link against C code. We also know that there are decades of tooling
5151
built up around compiling languages other than Rust.
5252

@@ -58,7 +58,7 @@ functionality among packages.
5858
### Can Cargo be used inside of `make` (or `ninja`, or ...)
5959

6060
Indeed. While we intend Cargo to be useful as a standalone way to
61-
compile Rust projects at the top-level, we know that some people will
61+
compile Rust packages at the top-level, we know that some people will
6262
want to invoke Cargo from other build tools.
6363

6464
We have designed Cargo to work well in those contexts, paying attention
@@ -67,7 +67,7 @@ have some work to do on those fronts, but using Cargo in the context of
6767
conventional scripts is something we designed for from the beginning and
6868
will continue to prioritize.
6969

70-
### Does Cargo handle multi-platform projects or cross-compilation?
70+
### Does Cargo handle multi-platform packages or cross-compilation?
7171

7272
Rust itself provides facilities for configuring sections of code based
7373
on the platform. Cargo also supports [platform-specific
@@ -77,7 +77,7 @@ configuration in `Cargo.toml` in the future.
7777
[target-deps]: reference/specifying-dependencies.html#platform-specific-dependencies
7878

7979
In the longer-term, we’re looking at ways to conveniently cross-compile
80-
projects using Cargo.
80+
packages using Cargo.
8181

8282
### Does Cargo support environments, like `production` or `test`?
8383

@@ -105,10 +105,10 @@ issue][3].
105105

106106
The purpose of a `Cargo.lock` is to describe the state of the world at the time
107107
of a successful build. It is then used to provide deterministic builds across
108-
whatever machine is building the project by ensuring that the exact same
108+
whatever machine is building the package by ensuring that the exact same
109109
dependencies are being compiled.
110110

111-
This property is most desirable from applications and projects which are at the
111+
This property is most desirable from applications and packages which are at the
112112
very end of the dependency chain (binaries). As a result, it is recommended that
113113
all binaries check in their `Cargo.lock`.
114114

src/doc/src/getting-started/first-steps.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## First Steps with Cargo
22

3-
To start a new project with Cargo, use `cargo new`:
3+
To start a new package with Cargo, use `cargo new`:
44

55
```console
66
$ cargo new hello_world
@@ -32,7 +32,7 @@ authors = ["Your Name <[email protected]>"]
3232
```
3333

3434
This is called a **manifest**, and it contains all of the metadata that Cargo
35-
needs to compile your project.
35+
needs to compile your package.
3636

3737
Here’s what’s in `src/main.rs`:
3838

@@ -46,7 +46,7 @@ Cargo generated a “hello world” for us. Let’s compile it:
4646

4747
```console
4848
$ cargo build
49-
Compiling hello_world v0.1.0 (file:///path/to/project/hello_world)
49+
Compiling hello_world v0.1.0 (file:///path/to/package/hello_world)
5050
```
5151

5252
And then run it:
@@ -60,7 +60,7 @@ We can also use `cargo run` to compile and then run it, all in one step:
6060

6161
```console
6262
$ cargo run
63-
Fresh hello_world v0.1.0 (file:///path/to/project/hello_world)
63+
Fresh hello_world v0.1.0 (file:///path/to/package/hello_world)
6464
Running `target/hello_world`
6565
Hello, world!
6666
```

src/doc/src/guide/cargo-toml-vs-cargo-lock.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ about them, here’s a summary:
88
* `Cargo.lock` contains exact information about your dependencies. It is
99
maintained by Cargo and should not be manually edited.
1010

11-
If you’re building a library that other projects will depend on, put
11+
If you’re building a library that other packages will depend on, put
1212
`Cargo.lock` in your `.gitignore`. If you’re building an executable like a
1313
command-line tool or an application, check `Cargo.lock` into `git`. If you're
1414
curious about why that is, see ["Why do binaries have `Cargo.lock` in version
@@ -18,8 +18,8 @@ FAQ](faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-librarie
1818
Let’s dig in a little bit more.
1919

2020
`Cargo.toml` is a **manifest** file in which we can specify a bunch of
21-
different metadata about our project. For example, we can say that we depend
22-
on another project:
21+
different metadata about our package. For example, we can say that we depend
22+
on another package:
2323

2424
```toml
2525
[package]
@@ -31,13 +31,13 @@ authors = ["Your Name <[email protected]>"]
3131
rand = { git = "https://github.com/rust-lang-nursery/rand.git" }
3232
```
3333

34-
This project has a single dependency, on the `rand` library. We’ve stated in
34+
This package has a single dependency, on the `rand` library. We’ve stated in
3535
this case that we’re relying on a particular Git repository that lives on
3636
GitHub. Since we haven’t specified any other information, Cargo assumes that
37-
we intend to use the latest commit on the `master` branch to build our project.
37+
we intend to use the latest commit on the `master` branch to build our package.
3838

39-
Sound good? Well, there’s one problem: If you build this project today, and
40-
then you send a copy to me, and I build this project tomorrow, something bad
39+
Sound good? Well, there’s one problem: If you build this package today, and
40+
then you send a copy to me, and I build this package tomorrow, something bad
4141
could happen. There could be more commits to `rand` in the meantime, and my
4242
build would include new commits while yours would not. Therefore, we would
4343
get different builds. This would be bad because we want reproducible builds.
@@ -85,7 +85,7 @@ source = "git+https://github.com/rust-lang-nursery/rand.git#9f35b8e439eeedd60b94
8585
```
8686

8787
You can see that there’s a lot more information here, including the exact
88-
revision we used to build. Now when you give your project to someone else,
88+
revision we used to build. Now when you give your package to someone else,
8989
they’ll use the exact same SHA, even though we didn’t specify it in our
9090
`Cargo.toml`.
9191

src/doc/src/guide/continuous-integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Travis CI
44

5-
To test your project on Travis CI, here is a sample `.travis.yml` file:
5+
To test your package on Travis CI, here is a sample `.travis.yml` file:
66

77
```yaml
88
language: rust
@@ -22,7 +22,7 @@ information.
2222
2323
### GitLab CI
2424
25-
To test your project on GitLab CI, here is a sample `.gitlab-ci.yml` file:
25+
To test your package on GitLab CI, here is a sample `.gitlab-ci.yml` file:
2626

2727
```yaml
2828
stages:

src/doc/src/guide/creating-a-new-project.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Creating a New Project
1+
## Creating a New Package
22

3-
To start a new project with Cargo, use `cargo new`:
3+
To start a new package with Cargo, use `cargo new`:
44

55
```console
66
$ cargo new hello_world --bin
@@ -33,7 +33,7 @@ authors = ["Your Name <[email protected]>"]
3333
```
3434

3535
This is called a **manifest**, and it contains all of the metadata that Cargo
36-
needs to compile your project.
36+
needs to compile your package.
3737

3838
Here’s what’s in `src/main.rs`:
3939

@@ -47,7 +47,7 @@ Cargo generated a “hello world” for us. Let’s compile it:
4747

4848
```console
4949
$ cargo build
50-
Compiling hello_world v0.1.0 (file:///path/to/project/hello_world)
50+
Compiling hello_world v0.1.0 (file:///path/to/package/hello_world)
5151
```
5252

5353
And then run it:
@@ -63,7 +63,7 @@ compiled):
6363

6464
```console
6565
$ cargo run
66-
Compiling hello_world v0.1.0 (file:///path/to/project/hello_world)
66+
Compiling hello_world v0.1.0 (file:///path/to/package/hello_world)
6767
Running `target/debug/hello_world`
6868
Hello, world!
6969
```
@@ -76,7 +76,7 @@ your files with optimizations turned on:
7676

7777
```console
7878
$ cargo build --release
79-
Compiling hello_world v0.1.0 (file:///path/to/project/hello_world)
79+
Compiling hello_world v0.1.0 (file:///path/to/package/hello_world)
8080
```
8181

8282
`cargo build --release` puts the resulting binary in `target/release` instead of

src/doc/src/guide/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $ cargo build
5959
Compiling memchr v0.1.5
6060
Compiling aho-corasick v0.3.0
6161
Compiling regex v0.1.41
62-
Compiling hello_world v0.1.0 (file:///path/to/project/hello_world)
62+
Compiling hello_world v0.1.0 (file:///path/to/package/hello_world)
6363
```
6464

6565
Our `Cargo.lock` contains the exact information about which revision of all of

src/doc/src/guide/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Cargo Guide
22

33
This guide will give you all that you need to know about how to use Cargo to
4-
develop Rust projects.
4+
develop Rust packages.
55

66
* [Why Cargo Exists](guide/why-cargo-exists.html)
7-
* [Creating a New Project](guide/creating-a-new-project.html)
8-
* [Working on an Existing Cargo Project](guide/working-on-an-existing-project.html)
7+
* [Creating a New Package](guide/creating-a-new-project.html)
8+
* [Working on an Existing Cargo Package](guide/working-on-an-existing-project.html)
99
* [Dependencies](guide/dependencies.html)
10-
* [Project Layout](guide/project-layout.html)
10+
* [Package Layout](guide/project-layout.html)
1111
* [Cargo.toml vs Cargo.lock](guide/cargo-toml-vs-cargo-lock.html)
1212
* [Tests](guide/tests.html)
1313
* [Continuous Integration](guide/continuous-integration.html)

src/doc/src/guide/project-layout.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## Project Layout
1+
## Package Layout
22

33
Cargo uses conventions for file placement to make it easy to dive into a new
4-
Cargo project:
4+
Cargo package:
55

66
```
77
.
@@ -20,7 +20,7 @@ Cargo project:
2020
└── some-integration-tests.rs
2121
```
2222

23-
* `Cargo.toml` and `Cargo.lock` are stored in the root of your project (*package
23+
* `Cargo.toml` and `Cargo.lock` are stored in the root of your package (*package
2424
root*).
2525
* Source code goes in the `src` directory.
2626
* The default library file is `src/lib.rs`.

src/doc/src/guide/tests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ Tests in your `src` files should be unit tests, and tests in `tests/` should be
66
integration-style tests. As such, you’ll need to import your crates into
77
the files in `tests`.
88

9-
Here's an example of running `cargo test` in our project, which currently has
9+
Here's an example of running `cargo test` in our package, which currently has
1010
no tests:
1111

1212
```console
1313
$ cargo test
1414
Compiling rand v0.1.0 (https://github.com/rust-lang-nursery/rand.git#9f35b8e)
15-
Compiling hello_world v0.1.0 (file:///path/to/project/hello_world)
15+
Compiling hello_world v0.1.0 (file:///path/to/package/hello_world)
1616
Running target/test/hello_world-9c2b65bbb79eabce
1717

1818
running 0 tests
1919

2020
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
2121
```
2222

23-
If our project had tests, we would see more output with the correct number of
23+
If our package had tests, we would see more output with the correct number of
2424
tests.
2525

2626
You can also run a specific test by passing a filter:

0 commit comments

Comments
 (0)