Document all the things!
- Date: October 3, 2015
- Subject: Documentation in general, and
cargo docin particular.
This is a mostly-empty module, and it is intended as such. Why? Well, because almost all the sample code exists in these comments, which serve as the show notes. If you listen to the episode or take a look at the source files, you'll see how it works!
The components below are included solely so you can see how the docstrings work with each kind of thing. Make sure to click on the names of the items: there is more documentation there. Again, take a look at the source to see how it looks in the context of a file module.
Note that this module-level docstring uses
//! rather than
comments. This is because this docstring is documenting the item which
contains it, rather than the following item. Per Rust RFC 505, the
preferred approach is always to use the "following" form (
///) rather than
the "containing" form (
//!), except for module-level docs like these.
(I will be following RFC 505 throughout.)
- Rust and MSVC tracking issue
- Other documentation tools:
- Rust 1.3 release announcement
- Rust's package hosting: crates.io
- Crater for testing for backwards compatibility
- Semantic versioning
- "Stability as a Deliverable": Rust official blog post on version stability, backwards compatibility, and release channels.
- The Rust book chapter on
This is a sample structure, to demonstrate
This documents a plain-old function.