mdbook-rustdoc-link

rustdoc-style linking for mdBook (with the help of rust-analyzer).

You write:

The [`option`][std::option] and [`result`][std::result] modules define optional and
error-handling types, [`Option<T>`] and [`Result<T, E>`]. The [`iter`][std::iter] module
defines Rust's iterator trait, [`Iterator`], which works with the `for` loop to access
collections. [^1]

You get:

The option and result modules define optional and error-handling types, Option<T> and Result<T, E>. The iter module defines Rust's iterator trait, Iterator, which works with the for loop to access collections. 1

mdbook-rustdoc-link is an mdBook preprocessor. Using rust-analyzer, it converts type names, module paths, and so on, into links to online crate docs. No more finding and pasting URLs by hand.

screen recording of mdbook-rustdoc-link during mdbook build

Overview

To get started, simply follow the quickstart guide!

If you would like to read more about this crate:

For writing documentation

For adapting this crate to your project

For additional usage information

Happy linking!

License

This project is released under the Apache 2.0 License and the MIT License.


  1. Text adapted from A Tour of The Rust Standard Library