rust-lang/docs.rs

Local Testing of docs.rs Build Process

Opened this issue · 0 comments

Hello,

I'm looking for instructions on how to replicate the documentation build process of docs.rs locally, so I can see if the changes I make work to fix my crates documentation build failures.

Things I've tried:

  • From the page https://docs.rs/about/builds:

    The Docs.rs README describes how to build unpublished crate documentation locally using the same build environment as the Docs.rs build agent.

    This links to a command cargo run -- start-web-server which doesn't work for me since I'm trying to test a library.

  • https://github.com/dtolnay/cargo-docs-rs
    This doesn't seem to replicate the build error and instead errors on different dependencies

  • from #752 (comment)

    At its heart, docbuilder runs cargo doc --lib --no-deps

    This command runs without issue and doesn't surface the build error.

Is there anything I can try locally, or is the only option to shoot from the hip and publish a release hoping it works? I know that I probably just need to add a feature under [package.metadata.docs.rs] to fix the build error.

Cheers