1717  RUSTUP_MAX_RETRIES : 10 
1818  FETCH_DEPTH : 0  #  pull in the tags for the version string
1919  MACOSX_DEPLOYMENT_TARGET : 13.0 
20-   CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER :  aarch64-linux-gnu-gcc 
21-   CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER :  arm-linux-gnueabihf-gcc 
20+   ZIG_VERSION :  0.13.0 
21+   ZIGBUILD_VERSION :  0.19.8 
2222
2323jobs :
2424  dist :
25-     if : ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action  == 'workflow_dispatch' }} 
25+     if : ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name  == 'workflow_dispatch' }} 
2626    strategy :
2727      matrix :
2828        include :
@@ -36,13 +36,15 @@ jobs:
3636            code-target : win32-arm64 
3737          - os : ubuntu-latest 
3838            target : x86_64-unknown-linux-gnu 
39+             zig_target : x86_64-unknown-linux-gnu.2.28 
3940            code-target : linux-x64 
40-             container : rockylinux:8 
4141          - os : ubuntu-latest 
4242            target : aarch64-unknown-linux-gnu 
43+             zig_target : aarch64-unknown-linux-gnu.2.28 
4344            code-target : linux-arm64 
4445          - os : ubuntu-latest 
4546            target : arm-unknown-linux-gnueabihf 
47+             zig_target : arm-unknown-linux-gnueabihf.2.28 
4648            code-target : linux-armhf 
4749          - os : macos-13 
4850            target : x86_64-apple-darwin 
@@ -64,40 +66,33 @@ jobs:
6466        with :
6567          fetch-depth : ${{ env.FETCH_DEPTH }} 
6668
67-       - name : Install toolchain dependencies 
68-         if : matrix.container == 'rockylinux:8' 
69-         shell : bash 
70-         run : | 
71-           dnf install -y gcc 
72-           curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y 
73-           echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH 
69+       - name : Install Node.js toolchain 
70+         uses : actions/setup-node@v4 
71+         with :
72+           node-version : 22 
7473
7574      - name : Install Rust toolchain 
7675        run : | 
7776          rustup update --no-self-update stable 
78-           rustup target add ${{ matrix.target }} 
7977          rustup component add rust-src 
78+           rustup target add ${{ matrix.target }} 
8079
81- name : Install Node.js 
82-         uses : actions/setup-node@v4 
83-         with :
84-           node-version : 18 
85- 
86-       - name : Update apt repositories 
87-         if : matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf' 
88-         run : sudo apt-get update 
89- 
90-       - name : Install AArch64 target toolchain 
91-         if : matrix.target == 'aarch64-unknown-linux-gnu' 
92-         run : sudo apt-get install gcc-aarch64-linux-gnu 
93- 
94-       - name : Install ARM target toolchain 
95-         if : matrix.target == 'arm-unknown-linux-gnueabihf' 
96-         run : sudo apt-get install gcc-arm-linux-gnueabihf 
80+ name : Install Zig toolchain 
81+         if : ${{ matrix.zig_target }} 
82+         run : | 
83+           which cargo 
84+           curl -L "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz" | sudo tar JxC /usr/local 
85+           sudo ln -s "/usr/local/zig-linux-$(uname -m)-${ZIG_VERSION}/zig" /usr/local/bin/zig 
86+           curl -L "https://github.com/rust-cross/cargo-zigbuild/releases/download/v${ZIGBUILD_VERSION}/cargo-zigbuild-v${ZIGBUILD_VERSION}.x86_64-unknown-linux-musl.tar.gz" | tar zxC ~/.cargo/bin 
9787
98-       - name : Dist 
88+ name : Dist (plain) 
89+         if : ${{ !matrix.zig_target }} 
9990        run : cargo xtask dist --client-patch-version ${{ github.run_number }} 
10091
92+       - name : Dist (using zigbuild) 
93+         if : ${{ matrix.zig_target }} 
94+         run : RA_TARGET=${{ matrix.zig_target}} cargo xtask dist --client-patch-version ${{ github.run_number }} --zig 
95+ 
10196      - run : npm ci 
10297        working-directory : editors/code 
10398
@@ -139,7 +134,7 @@ jobs:
139134          path : ./dist 
140135
141136  dist-x86_64-unknown-linux-musl :
142-     if : ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action  == 'workflow_dispatch' }} 
137+     if : ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name  == 'workflow_dispatch' }} 
143138    name : dist (x86_64-unknown-linux-musl) 
144139    runs-on : ubuntu-latest 
145140    env :
@@ -185,15 +180,15 @@ jobs:
185180          path : ./dist 
186181
187182  publish :
188-     if : ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action  == 'workflow_dispatch' }} 
183+     if : ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name  == 'workflow_dispatch' }} 
189184    name : publish 
190185    runs-on : ubuntu-latest 
191186    needs : ["dist", "dist-x86_64-unknown-linux-musl"] 
192187    steps :
193188      - name : Install Nodejs 
194189        uses : actions/setup-node@v4 
195190        with :
196-           node-version : 20 
191+           node-version : 22 
197192
198193      - run : echo "TAG=$(date --iso -u)" >> $GITHUB_ENV 
199194        if : github.ref == 'refs/heads/release' 
0 commit comments