Skip to content

Feat: Add Rust toolchain to windows-11-arm #77

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

Open
1 task done
yorickdowne opened this issue Apr 15, 2025 · 8 comments
Open
1 task done

Feat: Add Rust toolchain to windows-11-arm #77

yorickdowne opened this issue Apr 15, 2025 · 8 comments

Comments

@yorickdowne
Copy link

yorickdowne commented Apr 15, 2025

Type of issue

  • Request for additional tools or software for an existing image.

Describe the issue

windows-11-arm runner currently does not come with the Rust toolchain pre-installed

In testing, that environment is supported and something like this can add Rust:

      - name: Install rustup (Windows 11 ARM64)
        shell: pwsh
        run: |
          Invoke-WebRequest -Uri "https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe" -OutFile rustup-init.exe
          .\rustup-init.exe --default-toolchain none -y
          "$env:USERPROFILE\.cargo\bin" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
          "CARGO_HOME=$env:USERPROFILE\.cargo" | Out-File -Append -Encoding ascii $env:GITHUB_ENV
      - name: Install Rust (Windows 11 ARM64)
        shell: pwsh
        run: |
          rustup install stable
          rustup target add aarch64-pc-windows-msvc

Desired functionality

Have a Rust toolchain preinstalled in the windows-11-arm image

@alex
Copy link

alex commented Apr 15, 2025

FYI, this also isn't listed in the "Omitted Software" part of the docs: https://github.com/actions/partner-runner-images/blob/main/images/arm-windows-11-image.md#omitted-software

Much better to simply add it though :-)

@riverar
Copy link

riverar commented Apr 16, 2025

+1 Hit this while testing Arm runners in the Rust for Windows repository.

@AsherJingkongChen
Copy link

AsherJingkongChen commented Apr 19, 2025

For anyone who wants to install rustup in bash before actions-rust-lang/setup-rust-toolchain, so there will be no more error rustup: command not found occurs in your GitHub Action experimental ARM64 runner. You can skip the step after the issue closed.

            - if: matrix.os == 'windows-11-arm'
              name: Install rustup on Windows ARM
              run: |
                  curl -LOs https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
                  ./rustup-init.exe -y --default-toolchain none --no-modify-path
                  echo "$USERPROFILE/.cargo/bin" >> "$GITHUB_PATH"
            - uses: actions-rust-lang/setup-rust-toolchain@v1

@jonasbb
Copy link

jonasbb commented Apr 24, 2025

The just released actions-rust-lang/setup-rust-toolchain v1.12 includes Windows support and installs rustup and Rust for the Windows ARM images. It is no longer necessary to install rustup first.

actions-rust-lang/setup-rust-toolchain#58

@rimrul rimrul mentioned this issue May 3, 2025
4 tasks
@dpaoliello dpaoliello marked this as a duplicate of #93 May 4, 2025
@pareenaverma
Copy link

Thank you for reporting this issue, we’ll be adding the rust toolchain to the next version of the windows runners image.

@alex
Copy link

alex commented May 10, 2025

Is there any estimate you can share for when that will be? Thanks.

saschanaz added a commit to saschanaz/aioquic that referenced this issue May 11, 2025
@khmyznikov
Copy link

@alex early June is the plan.

@briansmith
Copy link

Thanks for providing this.

         if: matrix.os == 'windows-11-arm'

Obviously, this will vary depending on how your test matrix is set up. I believe you could use runner.os == 'Windows' && runner.arch = 'ARM64' or similar, to avoid this.

              name: Install rustup on Windows ARM
              run: |
                  curl -LOs https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
                  ./rustup-init.exe -y --default-toolchain none --no-modify-path
                  echo "$USERPROFILE/.cargo/bin" >> "$GITHUB_PATH"

This requires shell: sh.

            - uses: actions-rust-lang/setup-rust-toolchain@v1

This isn't strictly necessary; you could use rustup install to install the toolchain if you wish to avoid depending on any actions.

Ideally, one should also check the sha256sum of rustup-init.exe and ideally link to a specific version of it, to avoid surprises.

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

No branches or pull requests

8 participants