|  | 
|  | 1 | ++++ | 
|  | 2 | +path = "2025/10/15/docsrs-changed-default-targets" | 
|  | 3 | +title = "docs.rs: changed default targets" | 
|  | 4 | +authors = ["Denis Cornehl"] | 
|  | 5 | +aliases = ["2025/10/15/docsrs-changed-default-targets.html"] | 
|  | 6 | + | 
|  | 7 | +[extra] | 
|  | 8 | +team = "the docs.rs team" | 
|  | 9 | +team_url = "https://rust-lang.org/governance/teams/dev-tools/#team-docs-rs" | 
|  | 10 | ++++ | 
|  | 11 | + | 
|  | 12 | +With Apple's transition from x86_64 to its own silicon (ARM64), the Rust project | 
|  | 13 | +has updated its platform support tiers. | 
|  | 14 | + | 
|  | 15 | +Consequently, the `aarch64-apple-darwin` target has been promoted to Tier 1, | 
|  | 16 | +while the `x86_64-apple-darwin` target has been demoted to Tier 2. You can read | 
|  | 17 | +more about this change in | 
|  | 18 | +[RFC 3671](https://github.com/rust-lang/rfcs/pull/3671) and | 
|  | 19 | +[RFC 3841](https://github.com/rust-lang/rfcs/pull/3841). | 
|  | 20 | + | 
|  | 21 | +To align with this ecosystem shift, docs.rs is updating its default build | 
|  | 22 | +targets. | 
|  | 23 | + | 
|  | 24 | +Crates can provide [docs.rs metadata](https://docs.rs/about/metadata) to specify | 
|  | 25 | +which targets to build for. If this metadata is not provided, docs.rs uses a | 
|  | 26 | +default list of targets. We are now switching the default macOS target in this | 
|  | 27 | +list from `x86_64-apple-darwin` to `aarch64-apple-darwin`. | 
|  | 28 | + | 
|  | 29 | +The new default target list is: | 
|  | 30 | + | 
|  | 31 | +- `x86_64-unknown-linux-gnu` | 
|  | 32 | +- `aarch64-apple-darwin` (previously: `x86_64-apple-darwin`) | 
|  | 33 | +- `x86_64-pc-windows-msvc` | 
|  | 34 | +- `i686-unknown-linux-gnu` | 
|  | 35 | +- `i686-pc-windows-msvc` | 
|  | 36 | + | 
|  | 37 | +## If your crate requires the old target list | 
|  | 38 | + | 
|  | 39 | +If your crate needs to be built for the previous default target list, you can | 
|  | 40 | +explicitly define it using [docs.rs metadata](https://docs.rs/about/metadata) in | 
|  | 41 | +your `Cargo.toml`: | 
|  | 42 | + | 
|  | 43 | +```toml | 
|  | 44 | +[package.metadata.docs.rs] | 
|  | 45 | +targets = [ | 
|  | 46 | +    "x86_64-unknown-linux-gnu", | 
|  | 47 | +    "x86_64-apple-darwin", | 
|  | 48 | +    "x86_64-pc-windows-msvc", | 
|  | 49 | +    "i686-unknown-linux-gnu", | 
|  | 50 | +    "i686-pc-windows-msvc" | 
|  | 51 | +] | 
|  | 52 | +``` | 
0 commit comments