How to create Tutorial/Guide/API documentation in Rust?

I have been researching the ways in which you can create documentation in Rust and in what context.
The most obvious tool for that is the built-in rustdoc aka cargo doc but that is (from what I understand) mainly to serve as Reference/API documentation. For the other Guide or Tutorial Style documentation the Introduction - mdBook Documentation rust mdbook should be used (?). That makes a lot of sense and I like it. But my question is. Is there any other way in which Rust documentation should/can be created, and/or served?

For the tutorial or guide you can use anything - mdBook has sort of become standard in the Rust community because it is implemented in Rust, has been associated with it for quite a while and "the" book is written with it. But there is nothing else to it.
For API docs, cargo doc is the most direct way to go - although there may exist other tools for it, your users probably won't like the output since everyone is used to the format of rustdoc.

1 Like

more on "standard": when you upload a crate to , for example , the docs of this crate will be generated and sent to respo - Rust , automatically. not aware of other document tools that could also do this(by default).

Technically, it's possible to use as the guide-style builder - dtolnay - Rust is an example.

1 Like

My problem with docsrs is that they do not support more advanced writing features like more advanced markdown features, latex, its not easy to paste an image etc etc

Another example of a crate using rustdoc for a guide is the error handling library snafu:

1 Like

Recently I noticed this:


Edited to add: See it working on

1 Like

Nice! Thanks <3

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.