Skip to content
master
Go to file
Code

Latest commit

…alexcrichton

doc (book): add "Getting Started" subsection: "Essential Terminology"

# Reworked PR (2020-11-21)

Fixes #8854

In The Cargo Book, beef-up the glossary, and provide hyperlinks to the definitions of key terms through both the "Getting Started" and "Cargo Guide" chapters.

In addition to the links, some transitional text (two sentences) has been added to the beginning of "First Steps with Cargo", and somewhat more to "Why Cargo Exists" in the guide. The intent is cater to readers jumping into this book cold, or perhaps coming from the "Hello, Cargo!" section at the beginning of The Book. The changes assume a knowledgeable but skeptical user, so take pains to justify the reader's attention. A developer that knows very little about Rust and nothing about Cargo and can follow the text and map Cargo-specific concepts to analogues in other language ecosystems.

Within the glossary many terms are touched-up, as described in the commit message for the first patch in the series. Intra-glossary links are added between all terms.

In the "Getting Started" and "Cargo Guide" chapters, terms are linked to their glossary entries throughout, for the first mention of a term within a given *section*. The first time a term is seen in the *chapter*, the markdown syntax for italics is used. In "First Steps with Cargo", both italics and bold markdown are used, in keeping with the existing styling.

# Orig PR (2020-11-12) -- obsolete

~~Insert short terminology cheatsheet page to explain these terms:~~

   * ~~package~~
   * ~~crate~~
      - ~~library crate~~
      - ~~binary crate~~
   * ~~module~~
   * ~~workspace~~

~~Important in these definitions is the fact that a single package is defined by
a single 'Cargo.toml' file, and that a non-workspace Cargo.toml package
contains one or more crates.~~

~~The last two terms in the list are just glossed over, as it is more important
that the user know that the terms exist, and that there are both lower-level
(module) and higher-level (workspace) concepts than the organizational units
(a package and its crates) that feature most prominently in basic cargo
builds.~~

~~With the addition of this new "Essential Terminology" page, the structure at
the beginning of The Cargo Book is:~~

    Introduction
    1. Getting Started
        1.1. Essential Terminology      <= new
        1.2. Installation
        1.3. First Steps with Cargo
    2. Cargo Guide
    ...

~~The terms in the above list are all well defined elsewhere in the Rust and
Cargo documentation, but a new user encountering them for the first time
should not need to hunt them down.~~

~~Since the opening sections of the Cargo book are among the first documents a
new user is likely to encounter, we are providing a little cheatsheet of the
essentials at this stage. Defining the above terms gives the reader a good
foothold to map concepts they may be familiar with from other languages onto
their Rust counterparts (roughly speaking).~~

~~Closes #8854~~
9991af3

Files

Permalink
Failed to load latest commit information.

README.md

Cargo

Cargo downloads your Rust project’s dependencies and compiles your project.

Learn more at https://doc.rust-lang.org/cargo/

Code Status

Build Status

Code documentation: https://docs.rs/cargo/

Installing Cargo

Cargo is distributed by default with Rust, so if you've got rustc installed locally you probably also have cargo installed locally.

Compiling from Source

Cargo requires the following tools and packages to build:

  • git
  • curl (on Unix)
  • pkg-config (on Unix, used to figure out the libssl headers/libraries)
  • OpenSSL headers (only for Unix, this is the libssl-dev package on ubuntu)
  • cargo and rustc

First, you'll want to check out this repository

git clone https://github.com/rust-lang/cargo
cd cargo

With cargo already installed, you can simply run:

cargo build --release

Adding new subcommands to Cargo

Cargo is designed to be extensible with new subcommands without having to modify Cargo itself. See the Wiki page for more details and a list of known community-developed subcommands.

Releases

Cargo releases coincide with Rust releases. High level release notes are available as part of Rust's release notes. Detailed release notes are available in this repo at CHANGELOG.md.

Reporting issues

Found a bug? We'd love to know about it!

Please report all issues on the GitHub issue tracker.

Contributing

See the Cargo Contributor Guide for a complete introduction to contributing to Cargo.

License

Cargo is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

Third party software

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (https://www.openssl.org/).

In binary form, this product includes software that is licensed under the terms of the GNU General Public License, version 2, with a linking exception, which can be obtained from the upstream repository.

See LICENSE-THIRD-PARTY for details.

You can’t perform that action at this time.