Skip to content

docs(user-guide/cross-compilation): revamp descriptions - #5029

Open
rami3l wants to merge 1 commit into
rust-lang:mainfrom
rami3l:docs/xcomp-desc
Open

docs(user-guide/cross-compilation): revamp descriptions#5029
rami3l wants to merge 1 commit into
rust-lang:mainfrom
rami3l:docs/xcomp-desc

Conversation

@rami3l

@rami3l rami3l commented Aug 22, 2026

Copy link
Copy Markdown
Member

It looks like many newcomers to Rust are still having difficulties understanding the distinction between the host platform and the compilation targets. Examples:

This patch aims to further clarify that point.

cc @pgalbraith for review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 choice suggests 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 add and rustup target remove both 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 --toolchain example 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-msvc is 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; use i686-pc-windows-msvc here 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.

View changes since this review

Comment thread doc/user-guide/src/cross-compilation.md Outdated
Comment thread doc/user-guide/src/cross-compilation.md Outdated
Comment thread doc/user-guide/src/cross-compilation.md Outdated
Comment thread doc/user-guide/src/cross-compilation.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rami3l
rami3l marked this pull request as ready for review August 22, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants