docs.rs stores the rustdoc
output in a ZIP file.
These archives can be used as a base for further processing of the documentation for offline readers like Dash or Zeal. They are not directly usable for offline documentation.
The download is possible for specific or semantic versions:
But also via docs.rs/crate/clap/latest/download to get the latest version.To unpack the ZIP file you need any zip utility that supports PKZIP version 4.6 and BZIP2 compression.
The archives will contain all the documentation HTML files for all targets and CSS/JS assets that are specific to the build. The default target will be found at the root, and other targets each in its own subfolder.
Docs.rs is running rustdoc with --static-root-path "/-/rustdoc.static/"
,
which leads to all references to static assets breaking if they are not
available under that path. Older builds used --static-root-path "/"
, which
means you will have to handle both.
Since we're also adding --emit=invocation-specific
to our build
the archives will not contain any static assets that are specific to the
toolchain. For now these will have to be downloaded file-by-file directly
from docs.rs.