Skip to content

Rustdoc hosting

Haven builds and hosts rustdoc for the crates in your namespaces, so private crates get the same “read the docs” experience as crates.io packages get from docs.rs.

When a version is published, a sandboxed builder picks it up, runs cargo doc in an isolated throwaway environment, and uploads the result. The crate page’s Docs tab shows build status and links to the generated documentation. No setup is needed; publishing is enough.

Docs are served under the namespace:

https://haven.example.com/ns/acme/docs/my-crate/1.2.3/

Access follows the namespace’s read rules exactly: whoever can download the crate can read its docs, nobody else. Docs for held versions are visible to the same audience that can see the held version itself.

If you build docs yourself (custom flags, private toolchain), upload a zip of the rustdoc output for a version through the API instead. The crate page documents the endpoint; uploads are size-capped (100 MiB by default) and replace the built docs atomically.

Hosted docs are served with a strict security policy that blocks all script execution. Rustdoc pages render fully, but two JavaScript features degrade:

  • Search inside the rustdoc pages does not work.
  • The rustdoc theme picker and settings do not apply.

This is a deliberate trade: crate documentation is arbitrary generated HTML, and the policy keeps it from running code in your browser session. Use the namespace’s crate list and the docs sidebar for navigation.