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-darwinAdd 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-darwinHow 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
Tauri "webkit2gtk ... not found" missing system deps on Linux in CIFix Tauri "The system library `webkit2gtk-4.1` required by crate `webkit2gtk-sys` was not found" in CI - the…
Tauri "failed to run custom build command for app" in CIFix Tauri "error: failed to run custom build command for `app`" in CI - the app crate's build.rs (tauri-build…
Tauri NSIS "makensis not found" on Windows in CIFix Tauri NSIS bundling failures in CI when makensis is unavailable - the NSIS bundler downloads its toolchai…