Giter Site home page Giter Site logo

s-you / book Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rust-lang/book

0.0 3.0 0.0 30.47 MB

The Rust Programming Language

Home Page: https://doc.rust-lang.org/book/

License: Other

Shell 8.59% CSS 2.08% JavaScript 1.19% XSLT 18.46% Rust 68.56% HTML 1.13%

book's Introduction

The Rust Programming Language

Build Status

This repository contains the source of all editions of "the Rust Programming Language".

The second edition will also be available in dead-tree form by No Starch Press, available around June 2018. Check the No Starch Page for the latest information on the release date and how to order.

You can read all editions of 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, first cd into the directory of the edition of the book you'd like to build. For example, the first-edition or second-edition directory. Then 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.

2018 Edition

The "2018" Edition is in the process of being updated with the language changes that will be available with the 2018 Edition of the Rust language. All new contributions should be to this edition.

Second Edition

No Starch Press has brought the second edition to print. Pull requests fixing factual errors will be accepted and documented as errata; pull requests changing wording or other small corrections should be made against the 2018 edition instead.

First Edition

The first edition is frozen, and is not accepting any changes at this time.

Translations

We'd especially love help translating the second edition or 2018 edition of 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! The second edition is frozen and won't see major changes, so if you start with that, you won't have to redo work :)

No Starch

As the second edition of 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, there’s a directory, nostarch, which corresponds to the text in No Starch’s 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.

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).

book's People

Contributors

aaaxx avatar awaitlink avatar bmusin avatar carols10cents avatar chenl avatar clemensw avatar davidde avatar dnaeon avatar elahn avatar evuez avatar frewsxcv avatar grantmoyer avatar guillaumegomez avatar gypsydave5 avatar j3parker avatar jchovanec avatar jightuse avatar kraai avatar lancelafontaine avatar matthewjasper avatar mdesharnais avatar mimoo avatar outkaj avatar passcod avatar rcoh avatar rickeywang avatar scottabbey avatar spastorino avatar steveklabnik avatar ykomatsu avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.