Extract shared docs.rs build library and add a local build CLI - #3480
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
syphar
commented
Sep 8, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Member
Author
|
@GuillaumeGomez I think this is ready for first review. Sorry about the size :) Happy to explain / extend anything needed. |
GuillaumeGomez
approved these changes
Sep 23, 2026
This was referenced Sep 23, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Summary
Extract the shared docs.rs build pipeline into
docs_rs_rustwide, use it in the production builder, and introducedocs_rs_buildfor local and CI builds.The main goal is the shared library: separate building documentation from database updates, storage, and queue handling. There are plenty of further refactoring opportunities, but this PR focuses on that separation and the
changes needed to use it.
docs_rs_buildis an initial prerelease. The intention is to distribute it, try it in libraries, and invite crate authors to test it before settling the interface. GitHub Actions–generated binary releases are likely the initial distribution method; crates.io publication is not decided.docs_rs_builder.docs_rs_build_limitsis feature-gated.decisions.
Design
BuildEnvironmentmanages the workspace, toolchain, sandbox configuration, and maintenance. Callers can build a complete release or invoke individual steps with their own ordering and error handling.Step results preserve diagnostics on success and failure. HTML and JSON outputs are retained separately so subsequent steps cannot overwrite them. Fetching sources is a distinct lifecycle phase, allowing the production builder to archive them before build preparation can fail.
Publication remains in the production builder, separate from execution.
Behavior changes
The CLI automatically packages local crates, reports results and timings in a table, and prints retained artifact paths. Auxiliary failures are nonfatal by default;
--strictmakes them affect the exit status.Not yet