Rust 程序设计语言 中文版——Chinese translation of The Rust Programming Language (Book)
Go to file
2016-11-02 10:42:24 -04:00
.github Add an issue template explaining the new/old book business 2016-08-26 16:10:21 -07:00
dot Modify the dot files with the changes to the SVGs 2016-10-03 22:40:19 -04:00
nostarch Fixing word wrapping to make diffs less noisy 2016-11-02 10:42:24 -04:00
src Remove "distinct" from tuple explanation 2016-11-01 10:11:54 -04:00
tools Handle more docx xml 2016-10-31 19:53:47 -04:00
.gitignore Add a script that hooks the nostarch build commands together 2016-08-18 10:54:22 -04:00
.travis.yml Make notes since we now know 1.14 will have the question mark 2016-10-18 18:37:15 -04:00
book.json book.json should be at the top level 2015-12-28 10:37:36 -05:00
Cargo.lock Add a script that concatenates chapters into one file 2016-08-16 00:40:12 +03:00
Cargo.toml Move rust tools out of book src dir 2016-10-14 14:42:35 -04:00
deploy.sh deploy to the book repo, not rust by example. 2015-12-14 14:55:40 -05:00
doc-to-md.sh Script unzipping too; add instructions to README 2016-10-15 11:51:29 -04:00
nostarch.sh Move rust tools out of book src dir 2016-10-14 14:42:35 -04:00
README.md Script unzipping too; add instructions to README 2016-10-15 11:51:29 -04:00
style-guide.md Update style-guide.md 2016-09-06 17:07:14 -04:00

The Rust Programming Language

Build Status

This is the next iteration of “The Rust Programming Language”, which is currently located in the main Rust repository. If you want to read the book, you should check it out there or on the web.

If you would like to see this version rendered, its on GitHub pages.

Requirements

Building the book requires mdBook >= v0.0.13. To get it:

$ cargo install mdbook

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

Chrome:

$ google-chrome book/index.html           # Linux
$ open -a "Google Chrome" book/index.html # OS X

To run the tests:

$ mdbook test

Contributing

Im not going to be accepting major changes at first, but pull requests to fix typos and such are welcome. Please file any issues for any bugs you find.

This repository is under the same license as Rust itself, MIT/Apache2.

There are a number of labels on Issues:

  • Enhancement issues are a request for an improvement of some kind.
  • Bug issues indicate problems in the text.
  • Needs Backport will be used when we are further along. At some point, we will import the text into their review system, and so changes made here will need to be upstreamed. This will track those.

No Starch

As the book will be published by No Starch, we first iterate here, then ship the text off to No Starch. Then they do editing, and we fold it back in.

As such, theres a directory, nostarch, which corresponds to the text in No Starchs system.

When we've started working with No Starch in a word doc, we will also check those into the repo in the nostarch/odt directory. To extract the text from the word doc as markdown in order to backport changes to the online book:

  1. Open the doc file in LibreOffice
  2. Accept all tracked changes
  3. Save as Microsoft Word 2007-2013 XML (.docx) in the tmp directory
  4. Run ./doc-to-md.sh
  5. Inspect changes made to the markdown file in the nostarch directory and copy the changes to the src directory as appropriate.