About Docs.rs

Docs.rs (formerly cratesfyi) is an open source project to host documentation of crates for the Rust Programming Language.

Docs.rs automatically builds crates' documentation released on crates.io using the nightly release of the Rust compiler.

The source code of Docs.rs is available on GitHub. If you ever encounter an issue, don't hesitate to report it! (And thanks in advance!)

The README of a crate is taken from the readme field defined in Cargo.toml. If a crate doesn't have this field, no README will be displayed.


Docs.rs is using semver to parse URLs. You can use this feature to access crates' documentation easily. Example of URL redirections for clap crate:

URL Redirects to documentation of
docs.rs/clap Latest version of clap
docs.rs/clap/~2 2.* version
docs.rs/clap/~2.9 2.9.* version
docs.rs/clap/2.9.3 2.9.3 version (you don't need = unlike semver)

The crates.fyi domain will redirect to docs.rs, supporting all of the redirects discussed above


You can use badges to show state of your documentation to your users. The default badge will be pointed at the latest version of a crate. You can use version parameter to show status of documentation for any version you want.

Badge will display in blue if docs.rs is successfully hosting your crate documentation, and red if building documentation failing.

Example badges for mio crate:

URL Badge
Latest version: https://docs.rs/mio/badge.svg mio
Version 0.4.4: https://docs.rs/mio/badge.svg?version=0.4.4 mio
Version 0.1.0: https://docs.rs/mio/badge.svg?version=0.1.0 mio

Metadata for custom builds

You can customize docs.rs builds by defining [package.metadata.docs.rs] table in your crates' `Cargo.toml`.

An example metadata:

  name = "test"

  features = [ "feature1", "feature2" ]
  all-features = true
  no-default-features = true
  default-target = "x86_64-unknown-linux-gnu"
  rustc-args = [ "--example-rustc-arg" ]
  rustdoc-args = [ "--example-rustdoc-arg" ]
  dependencies = [ "example-system-dependency" ]


Currently running Docs.rs version is: 0.5.0 (32102ce 2018-07-06)



Hosting generously provided by:

Powered by LeaseWeb

If you are interested in sponsoring Docs.rs, please don't hesitate to contact us at onur@onur.im