Skip to content
Latchkey

Tauri Rust "target may not be installed" in CI

Building a Tauri app for a target triple needs the matching Rust standard library, installed via rustup. If the target was never added (common for Apple Silicon, universal, or Windows MSVC builds), cargo cannot find std for it.

What this error means

cargo/tauri build fails with "error[E0463]: can't find crate for std" and "note: the aarch64-apple-darwin target may not be installed".

cargo
error[E0463]: can't find crate for `std`
  = note: the `aarch64-apple-darwin` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-apple-darwin`

Common causes

The cross target was not added

rustup only installs the host target by default; building for another triple needs rustup target add.

A universal macOS build needs both arches

A universal-apple-darwin build requires both x86_64 and aarch64 targets present.

How to fix it

Add the target with rustup

Install the standard library for the triple before building.

Terminal
rustup target add aarch64-apple-darwin
npx tauri build --target aarch64-apple-darwin

Add both arches for a universal build

Install both targets so a universal binary can link.

Terminal
rustup target add x86_64-apple-darwin aarch64-apple-darwin
npx tauri build --target universal-apple-darwin

How to prevent it

  • Add required targets in a setup step before the build.
  • Use a rust toolchain action with targets configured.
  • Install both arches when producing universal binaries.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →