book README

The project's README from github.com/rust-lang/book. As one markdown file: 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.

See the releases to download just the code of all the code listings that appear in the book.

Requirements

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

$ cargo install mdbook --locked --version <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:

$ cd packages/trpl
$ mdbook test --library-path packages/trpl/target/debug/deps

Contributing

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

Because the book is printed, and because we want to keep the online version of the book close to the print version when possible, it may take longer than you're used to for us to address your issue or pull request.

So far, we've been doing a larger revision to coincide with Rust Editions. Between those larger revisions, we will only be correcting errors. If your issue or pull request isn't strictly fixing an error, it might sit until the next time that we're working on a large revision: expect on the order of months or years. Thank you for your patience!

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!

Spellchecking

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

book (rust-lang/book)

Searching Database…

18.4K ·GitHub
这是什么?Rust 的官方入门书——《The Rust Programming Language》。这个仓库保存的是书的源文件;你可以在线免费阅读,也可以从 No Starch Press 购买纸质版。
那这个仓库到底是一个程序,还是书本身?是书本身——准确说是书的源文件。可读的文本以免费网站的形式发布,No Starch Press 出售同样内容的纸质版。
怎么读?需要安装什么东西吗?什么都不用装:直接在线阅读就行。随最新 stable、beta 和 nightly 版 Rust 一起发布的书各有一版。
如果我想在本地构建这本书呢?你需要 mdBook,最好用 rust-lang/rust 所用的同一版本;构建出来的网站会放在 book 子目录里,可以直接用浏览器打开。
我该看 stable、beta 还是 nightly 版 Rust 构建的书?大多数读者看 stable 版就够了。随版本附带的那些更新得没那么频繁,所以你在那里发现的问题,可能在这个仓库里已经修好了。
纸质版和免费在线版内容不一样吗?内容是一样的——团队有意让在线版在可能的情况下尽量贴近 No Starch 的纸质版。
Creator
rust-lang
Size
70.5 MB
Stars
18.4K
Age
10y
Commits · 90 Days