Go to file
Carol (Nichols || Goulding) 80cf2b037f
spellingz
2019-02-18 20:50:12 -05:00
2018-edition Removed copyright notices & made cosmetic improvements. 2019-01-13 03:29:45 +00:00
ci spellingz 2019-02-18 20:50:12 -05:00
dot move the book to the top level 2018-11-20 13:45:05 -05:00
first-edition Add procedural macros 2019-02-05 18:45:08 +00:00
nostarch Propagate changes 2019-02-18 18:10:23 -05:00
redirects Merge pull request #1644 from psincf/patch-2 2018-12-12 22:29:00 -05:00
second-edition Fix Links to point to relevant chapters in new book 2019-02-05 22:55:06 +04:00
src Propagate changes 2019-02-18 18:10:23 -05:00
theme move the book to the top level 2018-11-20 13:45:05 -05:00
tools Add yet another case to the xsl template 2019-01-29 17:21:14 -05:00
.gitattributes Mark png as binary 2017-03-31 15:30:48 -04:00
.gitignore Add a script that hooks the nostarch build commands together 2016-08-18 10:54:22 -04:00
.travis.yml Pin Rust to 1.31.1 in CI for now 2019-01-28 21:33:40 -05:00
CONTRIBUTING.md Fix up contribution instructions 2018-12-12 09:59:58 -05:00
COPYRIGHT COPYRIGHT: hoedown is no longer used 2017-04-06 21:56:44 +08:00
Cargo.lock move the book to the top level 2018-11-20 13:45:05 -05:00
Cargo.toml Add edition to Cargo.toml, use 2018 edition idoms 2018-12-16 22:56:38 -05:00
LICENSE-APACHE Work towards getting tidy clean 2017-03-13 13:51:36 -04:00
LICENSE-MIT Work towards getting tidy clean 2017-03-13 13:51:36 -04:00
README.md Update some details in the README 2019-01-05 20:11:01 -05:00
book.toml move the book to the top level 2018-11-20 13:45:05 -05:00
convert-quotes.sh Removed copyright notices & made cosmetic improvements. 2019-01-13 03:29:45 +00:00
doc-to-md.sh Move my script up 2019-01-29 10:03:40 -05:00
ferris.css move the book to the top level 2018-11-20 13:45:05 -05:00
ferris.js move the book to the top level 2018-11-20 13:45:05 -05:00
nostarch.sh Removed copyright notices & made cosmetic improvements. 2019-01-13 03:29:45 +00:00
style-guide.md move the book to the top level 2018-11-20 13:45:05 -05:00

README.md

The Rust Programming Language

Build Status

This repository contains the source of "The Rust Programming Language" book.

The book is available in dead-tree form from No Starch Press

You can also read the book for free online. Please see the book as shipped with the latest stable, beta, or nightly Rust releases. Be aware that issues in those versions may have been fixed in this repository already, as those releases are updated less frequently.

Requirements

Building the book requires mdBook, ideally the same version that rust-lang/rust uses in this file. To get it:

$ cargo install mdbook --vers [version-num]

Building

To build the book, type:

$ mdbook build

The output will be in the book subdirectory. To check it out, open it in your web browser.

Firefox:

$ firefox book/index.html                       # Linux
$ open -a "Firefox" book/index.html             # OS X
$ Start-Process "firefox.exe" .\book\index.html # Windows (PowerShell)
$ start firefox.exe .\book\index.html           # Windows (Cmd)

Chrome:

$ google-chrome book/index.html                 # Linux
$ open -a "Google Chrome" book/index.html       # OS X
$ Start-Process "chrome.exe" .\book\index.html  # Windows (PowerShell)
$ start chrome.exe .\book\index.html            # Windows (Cmd)

To run the tests:

$ mdbook test

Contributing

We'd love your help! Please see CONTRIBUTING.md to learn about the kinds of contributions we're looking for.

Translations

We'd love help translating the book! See the Translations label to join in efforts that are currently in progress. Open a new issue to start working on a new language! We're waiting on mdbook support for multiple languages before we merge any in, but feel free to start!

Graphviz dot

We're using Graphviz for some of the diagrams in the book. The source for those files live in the dot directory. To turn a dot file, for example, dot/trpl04-01.dot into an svg, run:

$ dot dot/trpl04-01.dot -Tsvg > src/img/trpl04-01.svg

In the generated SVG, remove the width and the height attributes from the svg element and set the viewBox attribute to 0.00 0.00 1000.00 1000.00 or other values that don't cut off the image.

Spellchecking

To scan source files for spelling errors, you can use the spellcheck.sh script. It needs a dictionary of valid words, which is provided in dictionary.txt. If the script produces a false positive (say, you used word BTreeMap which the script considers invalid), you need to add this word to dictionary.txt (keep the sorted order for consistency).