Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Basically, whatever you write in doc comments will be turned into documentation by the cargo doc command. https://docs.rs is a website that automatically renders the output of cargo doc and posts it online. For detailed documentation, it's the place to go.
The standard place that most people will check is docs.rs, so I'd recommend putting as much as possible in doc comments, to make it easily navigable. You can put documentation = "https://docs.rs/crate-name/x.y.z" in Cargo.toml if you want to make it slightly more discoverable (iirc https://crates.io doesn't show a docs.rs link otherwise? which seems weird to me. I tend to use https://lib.rs which does) but yea, rustdoc/docs.rs is where the documentation for 99.9% of crates lives.
if you are interested in a user manual, you can use mdbook as well. for an example, my bitvec project uses mdbook (book.toml) and a github action (.github/workflows/gh-pages.yml) to compile the guide and host it as a github pages website. it's slightly more complicated, and i'd like docs.rs to follow hexdoc.pm's example of hosting both api docs and prose, but until then this is a pretty reasonable solution.
Related posts
- bitcode 0.4 release - binary serialization format
- An optimized replacement of the infamous std::vector<🅱️ool>
- You need to stop idolizing programming languages.
- bit-twiddling tricks. It's the perfect example of Rust's no-compromises "ergonomics AND speed AND correctness" ideals
- An Armful of CHERIs: Memory Safety in the processor. Do we still need safe languages with CHERI?