# Rust "error[E0463]: can't find crate for `std`" in CI

> Fix Rust "error[E0463]: can't find crate for `std`" / "std not available" in CI - the target’s std isn’t installed. Run rustup target add for that target.

Source: https://latchkey.dev/learn/rust/rust-e0463-cant-find-crate-std  
Updated: 2026-06-25

You are cross-compiling to a target whose standard library isn’t installed. rustc can’t find `std` for that target because the precompiled `rust-std` component was never added via rustup.

## Diagnose it: toolchain, features, cache

```Terminal
rustc --version --verbose && cargo --version
cat rust-toolchain.toml 2>/dev/null
cargo tree -e features | head -30
cargo clean && cargo build --locked
```

> Always build with `--locked` in CI. Without it Cargo may silently update `Cargo.lock`, so CI tests a dependency set you never committed.

## FAQ

### What causes Rust "error[E0463]: can't find crate for std" in CI?

There are 2 common causes: target std component not installed and a no_std-only or tier-3 target. Each cross-compilation target needs its own precompiled std (rust-std).

### How do I fix Rust "error[E0463]: can't find crate for std" in CI?

There are 2 fixes depending on which cause you have: add the target’s std and request the target in the setup action. Work through them in order, since the first is the most common.

### What does Rust "error[E0463]: can't find crate for std" in CI actually mean?

A --target build fails with error[E0463]: can't find crate for std (sometimes with a note that std isn’t available for the target).

### How do I stop Rust "error[E0463]: can't find crate for std" in CI happening again?

Install every cross-target with rustup target add in CI setup. The prevention section lists 3 changes that keep it from recurring.

### Can Latchkey fix this automatically?

Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
