Skip to content

Commit a815e45

Browse files
authored
Merge branch 'master' into add-config-toml-test-exclude
2 parents 13123c6 + ce36a96 commit a815e45

File tree

7,200 files changed

+154611
-99823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,200 files changed

+154611
-99823
lines changed

.editorconfig

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ end_of_line = lf
99
charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
12+
13+
[!src/llvm-project]
1214
indent_style = space
1315
indent_size = 4
1416

.git-blame-ignore-revs

+2
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ ec2cc761bc7067712ecc7734502f703fe3b024c8
2929
99cb0c6bc399fb94a0ddde7e9b38e9c00d523bad
3030
# reformat with rustfmt edition 2024
3131
c682aa162b0d41e21cc6748f4fecfe01efb69d1f
32+
# reformat with updated edition 2024
33+
1fcae03369abb4c2cc180cd5a49e1f4440a81300

.github/ISSUE_TEMPLATE/bootstrap.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
name: Bootstrap (Rust Build System) Report
3+
about: Issues encountered on bootstrap build system
4+
labels: C-bug, T-bootstrap
5+
---
6+
7+
<!--
8+
Thank you for submitting a bootstrap report! Please provide detailed information to help us reproduce and diagnose the issue.
9+
-->
10+
11+
### Summary
12+
13+
<!--
14+
Provide a brief description of the problem you are experiencing.
15+
-->
16+
17+
### Command used
18+
19+
```sh
20+
<command>
21+
```
22+
23+
### Expected behaviour
24+
25+
<!--
26+
Describe what you expected to happen.
27+
-->
28+
29+
### Actual behaviour
30+
31+
<!--
32+
Describe what actually happened.
33+
-->
34+
35+
### Bootstrap configuration (config.toml)
36+
```toml
37+
<config>
38+
```
39+
40+
### Operating system
41+
42+
<!--
43+
e.g., Ubuntu 22.04, macOS 12, Windows 10
44+
-->
45+
46+
### HEAD
47+
48+
<!--
49+
Output of `git rev-parse HEAD` command, or content of the `git-commit-hash` file if using a tarball source.
50+
-->
51+
52+
### Additional context
53+
<!--
54+
Include any other relevant information (e.g., if you have custom patches or modifications on the project).
55+
-->
56+
57+
58+
<!--
59+
Include the complete build log in the section below.
60+
Enable backtrace and verbose mode if possible for more detailed information e.g., with `RUST_BACKTRACE=1 ./x build -v`.
61+
-->
62+
<details><summary>Build Log</summary>
63+
<p>
64+
65+
```txt
66+
<log>
67+
```
68+
69+
</p>
70+
</details>

.github/workflows/ci.yml

+1-20
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ jobs:
6262
name: ${{ matrix.full_name }}
6363
needs: [ calculate_matrix ]
6464
runs-on: "${{ matrix.os }}"
65-
defaults:
66-
run:
67-
shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
6865
timeout-minutes: 360
6966
env:
7067
CI_JOB_NAME: ${{ matrix.name }}
@@ -80,22 +77,6 @@ jobs:
8077
# Check the `calculate_matrix` job to see how is the matrix defined.
8178
include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
8279
steps:
83-
- if: contains(matrix.os, 'windows')
84-
uses: msys2/[email protected]
85-
with:
86-
# i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64.
87-
msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}
88-
# don't try to download updates for already installed packages
89-
update: false
90-
# don't try to use the msys that comes built-in to the github runner,
91-
# so we can control what is installed (i.e. not python)
92-
release: true
93-
# Inherit the full path from the Windows environment, with MSYS2's */bin/
94-
# dirs placed in front. This lets us run Windows-native Python etc.
95-
path-type: inherit
96-
install: >
97-
make
98-
9980
- name: disable git crlf conversion
10081
run: git config --global core.autocrlf false
10182

@@ -109,7 +90,7 @@ jobs:
10990
# intensive jobs to run on free runners, which however also have
11091
# less disk space.
11192
- name: free up disk space
112-
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
93+
run: src/ci/scripts/free-disk-space.sh
11394
if: matrix.free_disk
11495

11596
# Rust Log Analyzer can't currently detect the PR number of a GitHub

.github/workflows/ghcr.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Mirror DockerHub images used by the Rust project to ghcr.io.
2+
# Images are available at https://github.com/orgs/rust-lang/packages.
3+
#
4+
# In some CI jobs, we pull images from ghcr.io instead of Docker Hub because
5+
# Docker Hub has a rate limit, while ghcr.io doesn't.
6+
# Those images are pushed to ghcr.io by this job.
7+
#
8+
# Note that authenticating to DockerHub or other registries isn't possible
9+
# for PR jobs, because forks can't access secrets.
10+
# That's why we use ghcr.io: it has no rate limit and it doesn't require authentication.
11+
12+
name: GHCR image mirroring
13+
14+
on:
15+
workflow_dispatch:
16+
schedule:
17+
# Run daily at midnight UTC
18+
- cron: '0 0 * * *'
19+
20+
jobs:
21+
mirror:
22+
name: DockerHub mirror
23+
runs-on: ubuntu-24.04
24+
if: github.repository == 'rust-lang/rust'
25+
permissions:
26+
# Needed to write to the ghcr.io registry
27+
packages: write
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
persist-credentials: false
32+
33+
- name: Log in to registry
34+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
35+
36+
# Download crane in the current directory.
37+
# We use crane because it copies the docker image for all the architectures available in
38+
# DockerHub for the image.
39+
# Learn more about crane at
40+
# https://github.com/google/go-containerregistry/blob/main/cmd/crane/README.md
41+
- name: Download crane
42+
run: |
43+
curl -sL "https://github.com/google/go-containerregistry/releases/download/${VERSION}/go-containerregistry_${OS}_${ARCH}.tar.gz" | tar -xzf -
44+
env:
45+
VERSION: v0.20.2
46+
OS: Linux
47+
ARCH: x86_64
48+
49+
- name: Mirror DockerHub
50+
run: |
51+
# List of DockerHub images to mirror to ghcr.io
52+
images=(
53+
# Mirrored because used by the mingw-check-tidy, which doesn't cache Docker images
54+
"ubuntu:22.04"
55+
# Mirrored because used by all linux CI jobs, including mingw-check-tidy
56+
"moby/buildkit:buildx-stable-1"
57+
)
58+
59+
# Mirror each image from DockerHub to ghcr.io
60+
for img in "${images[@]}"; do
61+
echo "Mirroring ${img}..."
62+
# Remove namespace from the image if any.
63+
# E.g. "moby/buildkit:buildx-stable-1" becomes "buildkit:buildx-stable-1"
64+
dest_image=$(echo "${img}" | cut -d'/' -f2-)
65+
./crane copy \
66+
"docker.io/${img}" \
67+
"ghcr.io/${{ github.repository_owner }}/${dest_image}"
68+
done

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ no_llvm_build
5454
/library/target
5555
/src/bootstrap/target
5656
/src/tools/x/target
57+
# Created by `x vendor`
58+
/vendor
5759
# Created by default with `src/ci/docker/run.sh`
5860
/obj/
5961
# Created by nix dev shell / .envrc
@@ -83,6 +85,7 @@ __pycache__/
8385
node_modules
8486
package-lock.json
8587
package.json
88+
/src/doc/rustc-dev-guide/mermaid.min.js
8689

8790
## Rustdoc GUI tests
8891
tests/rustdoc-gui/src/**.lock

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
[submodule "src/llvm-project"]
3030
path = src/llvm-project
3131
url = https://github.com/rust-lang/llvm-project.git
32-
branch = rustc/19.1-2024-12-03
32+
branch = rustc/20.1-2025-02-13
3333
shallow = true
3434
[submodule "src/doc/embedded-book"]
3535
path = src/doc/embedded-book

CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ Documentation for contributing to the compiler or tooling is located in the [Gui
1212
Development][rustc-dev-guide], commonly known as the [rustc-dev-guide]. Documentation for the
1313
standard library in the [Standard library developers Guide][std-dev-guide], commonly known as the [std-dev-guide].
1414

15+
## Making changes to subtrees and submodules
16+
17+
For submodules, changes need to be made against the repository corresponding the
18+
submodule, and not the main `rust-lang/rust` repository.
19+
20+
For subtrees, prefer sending a PR against the subtree's repository if it does
21+
not need to be made against the main `rust-lang/rust` repostory (e.g. a
22+
rustc-dev-guide change that does not accompany a compiler change).
23+
1524
## About the [rustc-dev-guide]
1625

1726
The [rustc-dev-guide] is meant to help document how rustc –the Rust compiler– works,

0 commit comments

Comments
 (0)