docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

Feature Request: A one command solution to locally building packaged crates with the same environment as docs.rs

Open nhtyy opened this issue 10 months ago • 1 comments

  • Docs rs is nowhere near as simple as just cargo doc --release
  • Its non trivial to reproduce building docs locally

nhtyy avatar Jan 13 '25 22:01 nhtyy

Could you relaborate what's missing for you? I'm aware that the situation could be better, but I would like to understand what would help you more.

What we currently have is:

  1. our docs about how to build locally, pointing to the build subcommand, where the only thing you need to run is docker-compose run web build crate <CRATE_NAME> <CRATE_VERSION> (also supports building local crates)
  2. if your crate doesn't need the "full" environment including the container / system dependencies, and you only want to quickly test if the feature / metadata combination for docs work, you can use cargo docs-rs.

Building exactly like docs.rs always involves docker so it never can be as simple as cargo doc --release.

syphar avatar Jan 14 '25 03:01 syphar