Go to file
Sam Zheng 6e6e8b4219
redundant word removed
"struct expressions can be in used in these situations" => "struct expressions can be used in these situations"
2023-03-29 14:46:43 +08:00
.github/workflows Github Actions: update to mdBook 0.4.14 2022-01-01 16:53:48 +00:00
src redundant word removed 2023-03-29 14:46:43 +08: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
LICENSE-MIT
README.md README.md: link to mdbook docs 2021-12-13 18:28:46 -05: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
triagebot.toml Enable triagebot shortcuts 2023-01-06 15:33:34 -08:00

README.md

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.

Dependencies

  • rustc (the Rust compiler).
  • mdbook (use cargo install mdbook to install it).
  • rust nightly (you would be required to set your Rust version to the nightly version to make sure all tests pass)

Build steps

To build the project, follow the steps given below :

Clone the project by downloading the ZIP from the GitHub page or run the following command:

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

Change the directory to the downloaded repository:

cd reference

To run the tests, you would need to set the Rust version to the nightly release. You can do this by executing the following command:

rustup override set nightly

This will set the nightly version only for your the current project.

If you wish to set Rust nightly for all your projects, you can run the command:

rustup default nightly

Now, run the following command to test the code snippets to catch compilation errors:

mdbook test

To generate a local instance of the book, run:

mdbook build

The generated HTML will be in the book folder.