The Rust Programming Language
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
This repository contains the source of "The Rust Programming Language" book.
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.
See the releases to download just the code of all the code listings that appear in the book.
$ cargo install mdbook --vers [version-num]
To build the book, type:
$ mdbook build
The output will be in the
booksubdirectory. To check it out, open it in your web browser.
bash $ 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)
bash $ 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
We'd love your help! Please see CONTRIBUTING.md to learn about the kinds of contributions we're looking for.
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!
To scan source files for spelling errors, you can use the
spellcheck.shscript. It needs a dictionary of valid words, which is provided in
dictionary.txt. If the script produces a false positive (say, you used word
BTreeMapwhich the script considers invalid), you need to add this word to
dictionary.txt(keep the sorted order for consistency).