Official Rust documentation
Cite the live page. Fetch it when the task needs current syntax, lint names, or checklist text. Do not invent APIs, lint ids, or rustdoc section names from memory.
Open first
| Need | Page |
|---|---|
| Formatting, imports, naming in source | Style Guide |
| Public crate API shape | API Guidelines and the checklist |
| Language and std | The Book, Reference, Rust by Example, std |
| Editions | Edition Guide |
| Unsafe | Nomicon, Reference: unsafety |
| Tooling | Cargo book, rustdoc, Clippy, rustfmt |
no_std / heap |
#![no_std], core, alloc |
| Asserts | debug_assert!, assert! |
Formatting without String |
format_args! |
| In-place slice algorithms | slice (sort_unstable*, select_nth_unstable*) |
| Profiles | Cargo profiles |
| Clippy config | Clippy configuration, lint configuration, lint index |
| rustdoc lints | rustdoc lints |
Language site: https://www.rust-lang.org/. Logo and trademark: rust-artwork, trademark policy.
API Guidelines checklist
Treat as the default for public crates. Quote the C-* id in review. Full text: checklist.
| Area | Ids |
|---|---|
| Naming | C-CASE, C-CONV, C-GETTER, C-ITER, C-ITER-TY, C-FEATURE, C-WORD-ORDER |
| Interoperability | C-COMMON-TRAITS, C-CONV-TRAITS, C-COLLECT, C-SERDE, C-SEND-SYNC, C-GOOD-ERR, C-NUM-FMT, C-RW-VALUE |
| Macros | C-EVOCATIVE, C-MACRO-ATTR, C-ANYWHERE, C-MACRO-VIS, C-MACRO-TY |
| Documentation | C-CRATE-DOC, C-EXAMPLE, C-QUESTION-MARK, C-FAILURE, C-LINK, C-METADATA, C-RELNOTES, C-HIDDEN |
| Predictability | C-SMART-PTR, C-CONV-SPECIFIC, C-METHOD, C-NO-OUT, C-OVERLOAD, C-DEREF, C-CTOR |
| Flexibility | C-INTERMEDIATE, C-CALLER-CONTROL, C-GENERIC, C-OBJECT |
| Type safety | C-NEWTYPE, C-CUSTOM-TYPE, C-BITFLAG, C-BUILDER |
| Dependability | C-VALIDATE, C-DTOR-FAIL, C-DTOR-BLOCK |
| Debuggability | C-DEBUG, C-DEBUG-NONEMPTY |
| Future proofing | C-SEALED, C-STRUCT-PRIVATE, C-NEWTYPE-HIDE, C-STRUCT-BOUNDS |
| Necessities | C-STABLE, C-PERMISSIVE |
C-NO-OUT and caller-owned buffers. Return values from ordinary library APIs. When the memory profile is heapless or allocation-free, caller-owned output and scratch slices are the contract (C-CALLER-CONTROL), not a Vec return.
Style Guide (source formatting)
Style Guide owns whitespace, wrapping, imports, and punctuation. rustfmt is the mechanical enforcer. Do not spend review time on formatting rustfmt already owns. Manual decisions stay on naming, module shape, visibility, API semantics, and control flow.
Import order when rustfmt is configured for it: std/core/alloc, then external crates, then workspace crates, then super/crate. Details: quality.md.