Welcome to an overview of the documentation provided by theRustproject. This page contains links to various helpful references,most of which are available offline (if opened withrustup doc). Many of theseresources take the form of “books”; we collectively call these “The RustBookshelf.” Some are large, some are small.
All of these books are managed by the Rust Organization, but other unofficialdocumentation resources are included here as well!
If you’re just looking for the standard library reference, here it is:Rust API documentation
If you’d like to learn Rust, this is the section for you! All of these resourcesassume that you have programmed before, but not in any specific language:
Affectionately nicknamed “the book,”The Rust Programming Languagewill give you an overview of the language from first principles. You’ll build afew projects along the way, and by the end, you’ll have a solid grasp of how touse the language.
If reading multiple hundreds of pages about a language isn’t your style, thenRust By Example has you covered. RBE shows off abunch of code without using a lot of words. It also includes exercises!
Rustlings guides youthrough downloading and setting up the Rust toolchain, then provides aninteractive tool that teaches you how to solve coding challenges in Rust.
TheRust Playground is a great placeto try out and share small bits of code, or experiment with some of the mostpopular crates.
Once you’ve gotten familiar with the language, these resources can help you putit to work.
Rust’s standard library hasextensive API documentation, withexplanations of how to use various things, as well as example code foraccomplishing various tasks. Code examples have a “Run” button on hover thatopens the sample in the playground.
Whenever you are working in a crate,cargo doc --open will generatedocumentation for your projectand all its dependencies in their correctversion, and open it in your browser. Add the flag--document-private-items toalso show items not markedpub.
The Release Notes describes the change history of the Rusttoolchain and language.
The Edition Guide describes the Rust editions andtheir differences. The latest version of the toolchain supports allhistorical editions.
rustc BookTherustc Book describes the Rust compiler,rustc.
The Cargo Book is a guide to Cargo, Rust’s build tool anddependency manager.
The Rustdoc Book describes our documentation tool,rustdoc.
The Clippy Book describes our static analyzer, Clippy.
Many of Rust’s errors come with error codes, and you can request extendeddiagnostics from the compiler on those errors (withrustc --explain). You canalso read them here if you prefer:rustc error codes
Once you’re quite familiar with the language, you may find these advancedresources useful.
The Reference is not a formal spec, but is more detailedand comprehensive than the book.
The Rust Style Guide describes the standard formattingof Rust code. Most developers usecargo fmt to invokerustfmt and format thecode automatically (the result matches this style guide).
The Rustonomicon is your guidebook to the dark arts ofunsafe Rust. It’s also sometimes called “the ’nomicon.”
The Unstable Book has documentation for unstablefeatures.
rustc Development GuideTherustc-dev-guidedocuments how the compiler works and how to contribute to it. This is useful ifyou want to build or modify the Rust compiler from source (e.g. to targetsomething non-standard).
When using Rust in specific domains, consider using the following resourcestailored to each area.
When developing for Bare Metal or Embedded Linux systems, you may find theseresources maintained by theEmbedded Working Group useful.
The Embedded Rust Book is targeted at developers familiar with embeddeddevelopment and familiar with Rust, but have not used Rust for embeddeddevelopment.