• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.cargo/H20-Jan-2022-43

.github/H20-Jan-2022-8778

2018-edition/H03-May-2022-1,5481,153

ci/H03-May-2022-10449

dot/H20-Jan-2022-332278

first-edition/H20-Jan-2022-806573

listings/H20-Jan-2022-23,17416,638

nostarch/H20-Jan-2022-9,9667,896

redirects/H20-Jan-2022-1,423947

second-edition/H20-Jan-2022-1,5001,112

src/H20-Jan-2022-23,25418,091

theme/H20-Jan-2022-108

tools/H20-Jan-2022-1,6081,270

ADMIN_TASKS.mdH A D19-Nov-20216 KiB126105

CONTRIBUTING.mdH A D19-Nov-20211.9 KiB4934

COPYRIGHTH A D19-Nov-202111.6 KiB291231

Cargo.lockH A D19-Nov-202111.9 KiB276244

Cargo.tomlH A D19-Nov-2021802 4737

LICENSE-APACHEH A D19-Nov-202110.6 KiB202169

LICENSE-MITH A D19-Nov-20211 KiB2622

README.mdH A D19-Nov-20213.6 KiB10675

book.tomlH A D19-Nov-2021294 97

ferris.cssH A D19-Nov-2021726 4639

rust-toolchainH A D19-Nov-20215 21

rustfmt.tomlH A D19-Nov-202115 21

style-guide.mdH A D19-Nov-20211.5 KiB3527

README.md

1# The Rust Programming Language
2
3![Build Status](https://github.com/rust-lang/book/workflows/CI/badge.svg)
4
5This repository contains the source of "The Rust Programming Language" book.
6
7[The book is available in dead-tree form from No Starch Press][nostarch].
8
9[nostarch]: https://nostarch.com/rust
10
11You can also read the book for free online. Please see the book as shipped with
12the latest [stable], [beta], or [nightly] Rust releases. Be aware that issues
13in those versions may have been fixed in this repository already, as those
14releases are updated less frequently.
15
16[stable]: https://doc.rust-lang.org/stable/book/
17[beta]: https://doc.rust-lang.org/beta/book/
18[nightly]: https://doc.rust-lang.org/nightly/book/
19
20See the [releases] to download just the code of all the code listings that appear in the book.
21
22[releases]: https://github.com/rust-lang/book/releases
23
24## Requirements
25
26Building the book requires [mdBook], ideally the same version that
27rust-lang/rust uses in [this file][rust-mdbook]. To get it:
28
29[mdBook]: https://github.com/rust-lang-nursery/mdBook
30[rust-mdbook]: https://github.com/rust-lang/rust/blob/master/src/tools/rustbook/Cargo.toml
31
32```bash
33$ cargo install mdbook --vers [version-num]
34```
35
36## Building
37
38To build the book, type:
39
40```bash
41$ mdbook build
42```
43
44The output will be in the `book` subdirectory. To check it out, open it in
45your web browser.
46
47_Firefox:_
48```bash
49$ firefox book/index.html                       # Linux
50$ open -a "Firefox" book/index.html             # OS X
51$ Start-Process "firefox.exe" .\book\index.html # Windows (PowerShell)
52$ start firefox.exe .\book\index.html           # Windows (Cmd)
53```
54
55_Chrome:_
56```bash
57$ google-chrome book/index.html                 # Linux
58$ open -a "Google Chrome" book/index.html       # OS X
59$ Start-Process "chrome.exe" .\book\index.html  # Windows (PowerShell)
60$ start chrome.exe .\book\index.html            # Windows (Cmd)
61```
62
63To run the tests:
64
65```bash
66$ mdbook test
67```
68
69## Contributing
70
71We'd love your help! Please see [CONTRIBUTING.md][contrib] to learn about the
72kinds of contributions we're looking for.
73
74[contrib]: https://github.com/rust-lang/book/blob/master/CONTRIBUTING.md
75
76Because the book is [printed](https://nostarch.com/rust), and because we want
77to keep the online version of the book close to the print version when
78possible, it may take longer than you're used to for us to address your issue
79or pull request.
80
81So far, we've been doing a larger revision to coincide with [Rust
82Editions](https://doc.rust-lang.org/edition-guide/). Between those larger
83revisions, we will only be correcting errors. If your issue or pull request
84isn't strictly fixing an error, it might sit until the next time that we're
85working on a large revision: expect on the order of months or years. Thank you
86for your patience!
87
88### Translations
89
90We'd love help translating the book! See the [Translations] label to join in
91efforts that are currently in progress. Open a new issue to start working on
92a new language! We're waiting on [mdbook support] for multiple languages
93before we merge any in, but feel free to start!
94
95[Translations]: https://github.com/rust-lang/book/issues?q=is%3Aopen+is%3Aissue+label%3ATranslations
96[mdbook support]: https://github.com/rust-lang-nursery/mdBook/issues/5
97
98## Spellchecking
99
100To scan source files for spelling errors, you can use the `spellcheck.sh`
101script available in the `ci` directory. It needs a dictionary of valid words,
102which is provided in `ci/dictionary.txt`. If the script produces a false
103positive (say, you used word `BTreeMap` which the script considers invalid),
104you need to add this word to `ci/dictionary.txt` (keep the sorted order for
105consistency).
106