-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs(dev-guide): mention how to support new compilation targets #4995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
rami3l
wants to merge
1
commit into
rust-lang:main
Choose a base branch
from
rami3l:docs/add-new-targets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+50
−1
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| # Summary | ||
|
|
||
| - [Introduction](index.md) | ||
| - [Linting](linting.md) | ||
| - [Linting](linting.md) | ||
| - [Coding standards](coding-standards.md) | ||
| - [Version numbers](version-numbers.md) | ||
| - [Recipes](recipes.md) | ||
| - [Release process](release-process.md) | ||
| - [Tips and tricks](tips-and-tricks.md) | ||
| - [Tracing](tracing.md) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Recipes | ||
|
|
||
| This section contains some recipes for common tasks that you may want to | ||
| perform when contributing to rustup. | ||
|
|
||
| ## Supporting a new compilation target | ||
|
|
||
| Adding support for a new compilation target is actually easy: | ||
|
|
||
| 1. Informing rustup about the new target: | ||
|
|
||
| Since you are here, it is quite likely that you are also promoting a target | ||
| from tier 3 to tier 2. As such, it is often sufficient to just cross-compile | ||
| rustup from Linux to that target. | ||
|
|
||
| You can refer to [rustup#4688] for a practical example for this step. You | ||
| can find in that PR a list of common places where you would need to add the | ||
| references of your new target in the rustup codebase. | ||
|
|
||
| Notably, you would need to add a line in | ||
| `ci/actions-templates/linux-builds-template.yaml` to enable it in rustup's | ||
| CI, with one caveat: if this target is not yet available in stable Rust, you | ||
| will need to disable its builds in the CI entirely. At the moment of | ||
| writing, this is done by appending the YAML comment | ||
| `# skip-pr skip-master skip-stable` at the end of the line when mentioning | ||
| your target in that file. | ||
|
|
||
| [rustup#4688]: https://github.com/rust-lang/rustup/pull/4688 | ||
|
|
||
| 2. Stabilizing the target: | ||
|
|
||
| When your new target reaches stable Rust, you can then enable the target in | ||
| CI. At the moment of writing, this is done by removing one or multiple | ||
| occurrences of `skip-*` in the aforementioned YAML comment. In most cases, | ||
| you would only need to enable the release CI for this target by removing | ||
| `skip-stable`. | ||
|
|
||
| You can refer to [rustup#4816] for a practical example for this step. | ||
|
|
||
| Do note that when creating the PR, to prove that the target CI is indeed | ||
| working, you will need to temporarily enable this target in this PR's CI by | ||
| removing `skip-pr` in a separate commit. Once the CI is green, you can send | ||
| the link ([example][send-link]) to that CI run in the PR thread for | ||
| verification. Finally, you can safely drop the temporary commit to get the | ||
| PR ready for merging. | ||
|
|
||
| [rustup#4816]: https://github.com/rust-lang/rustup/pull/4816 | ||
| [send-link]: https://github.com/rust-lang/rustup/pull/4816#issuecomment-4263419604 | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target's
View changes since the review