Go to file
Eric Huss 0b805c6580
Merge pull request #1509 from nefelitav/union-syntax-patch
union syntax fix for empty field list
2024-06-07 16:06:44 +00:00
.github/workflows Fix merge queue building twice. 2023-07-18 14:12:20 -07:00
src union syntax fix 2024-06-07 17:05:10 +02:00
style-check Switch style-check to Rust 2021 2021-10-21 13:36:11 -07:00
theme Fixed inconsistency in the usage of semicolon at end of scopes 2022-03-19 22:39:08 +01:00
.gitattributes Fix tidy on Windows 2017-04-06 01:52:45 +03:00
.gitignore Add stable-check to ignore. 2020-11-11 21:53:45 -08:00
CONTRIBUTING.md Grammar fix 2020-07-27 17:41:32 -07:00
LICENSE-APACHE manual -> reference & formatting 2017-03-02 14:56:49 -08:00
LICENSE-MIT manual -> reference & formatting 2017-03-02 14:56:49 -08:00
README.md Add `rust-toolchain.toml` and revise README 2024-02-19 07:03:53 +00:00
STYLE.md STYLE.md: say more about edition annotations for examples 2022-01-01 16:36:48 +00:00
book.toml merge unsafe-block and unsafe-function into one page 2022-09-28 17:31:50 +02:00
reference.md Redirect to the new reference 2017-03-02 14:57:38 -08:00
rust-toolchain.toml Add `rust-toolchain.toml` and revise README 2024-02-19 07:03:53 +00:00
triagebot.toml Enable triagebot shortcuts 2023-01-06 15:33:34 -08:00


The Rust Language Reference

This document is the primary reference for the Rust programming language.

This document is not normative. It may include details that are specific to rustc itself, and should not be taken as a specification for the Rust language. We intend to produce such a document someday, but this is what we have for now.


Installing dependencies

First, ensure that you have a recent copy of the nightly Rust compiler installed, as this is needed in order to run the tests:

rustup toolchain install nightly

Now, ensure you have mdbook installed, as this is needed in order to build the Reference:

cargo install --locked mdbook


To build the Reference, first clone the project:

git clone https://github.com/rust-lang/reference.git

(Alternatively, if you don't want to use git, download a ZIP file of the project, extract it using your preferred tool, and rename the top-level directory to reference.)

Now change your current directory to the working directory:

cd reference

To test all of the code examples in the Reference, run:

mdbook test

To build the Reference locally (in build/) and open it in a web browser, run:

mdbook build --open