@@ -254,12 +254,13 @@ build {
254254 provisioner "shell" {
255255 environment_vars = [" HOME=/Users/admin" , " USER=admin" ]
256256 inline = [
257- " echo 'Installing rustup...'" ,
258- " eval \" $(${ local . homebrew_path } /bin/brew shellenv)\" " ,
259- " ${ local . homebrew_path } /bin/brew install rustup" ,
260- " echo 'Installing Rust ${ var . rust_version } toolchain...'" ,
261- " rustup-init -y --no-modify-path --default-toolchain ${ var . rust_version } --profile minimal" ,
262- " rustup target add x86_64-apple-darwin" ,
257+ " echo 'Installing Rust ${ var . rust_version } via rustup installer...'" ,
258+ " curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain ${ var . rust_version } --profile minimal" ,
259+ // On arm64: adds the Intel cross-compile target (arm builds x86 binaries).
260+ // On x64: x86_64-apple-darwin is the host target already installed by the
261+ // toolchain installer, so this is a harmless no-op. Do not make this
262+ // architecture-conditional — the unconditional form is intentionally correct.
263+ " /Users/admin/.cargo/bin/rustup target add x86_64-apple-darwin" ,
263264 " echo 'export PATH=\" /Users/admin/.cargo/bin:$PATH\" ' >> /Users/admin/.zprofile" ,
264265 " /Users/admin/.cargo/bin/rustup --version" ,
265266 " /Users/admin/.cargo/bin/rustc --version" ,
0 commit comments