docs.rs: building fewer targets by default

2026/04/07

On May 1, 2026, docs.rs will make a breaking change to its build behavior. Currently, if a crate does not define a targets list in its docs.rs metadata, docs.rs builds documentation for a default list of five targets. However, starting on May 1, 2026, docs.rs will instead build documentation for only the default target unless additional targets are requested explicitly. This change is the next step in a change introduced in 2020, when docs.rs added support for opting into fewer build targets. "Most crates do not compile different code for different targets, so building fewer targets by default is a better fit for most releases." It also reduces build times and saves resources on docs.rs. This change only affects new releases and rebuilds of old releases. The default target is chosen based on the target of docs.rs build servers, which is x86_64-unknown-linux-gnu, but can be overridden by setting default-target in the docs.rs metadata. To build documentation for additional targets, define the full list explicitly in the Cargo.toml file. Docs.rs still supports any target available in the Rust toolchain, but the default behavior is changing. Review the changes and update your crates accordingly to ensure seamless documentation building.

References