Where do I document a published crate?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • docs.rs

    crates.io documentation generator

  • 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.

  • crates.io

    The Rust package registry

  • 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.

  • 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.

    InfluxDB logo
  • bitvec

    A crate for managing memory bit by bit

  • 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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts