docs(user-guide/cross-compilation): revamp descriptions - #5029
Open
rami3l wants to merge 1 commit into
Open
Conversation
rami3l
force-pushed
the
docs/xcomp-desc
branch
from
August 22, 2026 09:09
7abaf54 to
a6c59d6
Compare
There was a problem hiding this comment.
Pull request overview
Documentation update clarifying host platforms, compilation targets, and target management.
Changes:
- Renames and restructures the cross-compilation chapter.
- Adds host/target explanations and examples.
- Documents target installation and management commands.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Summary |
|---|---|
doc/user-guide/src/SUMMARY.md |
Updates the chapter navigation label. No comments. |
doc/user-guide/src/cross-compilation.md |
Adds host/target guidance and examples. Moderate findings: clarify the host target installation instruction (4 votes) and spell out valid Windows toolchain alternatives (3 votes). Nits: add that and a comma after platforms (4 and 3 votes). |
Suppressed comments (3)
doc/user-guide/src/cross-compilation.md:32
host tuple of your choicesuggests that any host triple can be selected, but the host is the platform on which the compiler runs and must be compatible with the current environment; for example, a glibc Linux host cannot run the musl host toolchain. Please qualify this as a host tuple compatible with the development environment so this note does not encourage the installation mistake this section is meant to prevent.
> tuple of your choice and compile to other targets as needed. For example, you
> don't need a `i686-pc-windows-msvc` host toolchain on your `x86_64` Windows
doc/user-guide/src/cross-compilation.md:71
rustup target addandrustup target removeboth require one or more target tuples, so the forms shown here fail with a missing<TARGET>argument. Include the operand in these examples, as in the--toolchainexample below.
- To see a list of available targets: `rustup target list`.
- To see a list of installed targets: `rustup target list --installed`.
- To remove a previously-installed target: `rustup target remove`.
doc/user-guide/src/cross-compilation.md:34
i686-msvcis not a complete Rust target tuple and is not the target name used elsewhere in this paragraph. Readers may try to use this shorthand as a Cargo target and get an invalid-target error; usei686-pc-windows-msvchere as well.
> stick to your existing `stable-x86_64-pc-windows-{msvc,gnu}` toolchain with
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
rami3l
force-pushed
the
docs/xcomp-desc
branch
from
August 22, 2026 09:14
0b143d9 to
8e9bc1d
Compare
rami3l
marked this pull request as ready for review
August 22, 2026 15:55
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.
It looks like many newcomers to Rust are still having difficulties understanding the distinction between the host platform and the compilation targets. Examples:
x86_64-unknown-linux-musltoolchain on a glibc host (like Ubuntu): Error running musl rustup on Ubuntu #3254x86_64-pc-windows-gnullvmtoolchain on a x64 Windows host to build for that target: [MSYS2] Allow default host triple to be overridden by an environment variable #5024This patch aims to further clarify that point.
cc @pgalbraith for review.