# Select and verify a toolchain

> Choose a Rust compiler and verify the version and targets used by a job.

Source: https://www.sorus.run/docs/guides/toolchains
Reviewed: 2026-10-21

## Select a toolchain

Start with the version and target your repository already uses. Check the version against [supported workloads](https://www.sorus.run/docs/supported-workloads#toolchains). The client uses an explicit `--toolchain` selection first, then the applicable captured `rust-toolchain` or `rust-toolchain.toml`, then the platform stable.

For example:

```sh
cargo sorus check --workspace --locked --toolchain 1.98.1 --json
```

Read `toolchain` and `toolchain_origin` in the JSON result. They state the resolved compiler and where the choice came from.

The platform stable is `1.98.0`; `stable`, a channel-less toolchain file and no toolchain file resolve to that version. A partial pin such as `1.88` selects the newest offered patch for that minor. A requested version outside the offered list is refused before job creation.

Cargo's `rust-version` specifies a minimum; it does not select the compiler. If your manifest requires a newer compiler than the platform stable, pin an offered version explicitly.

## Select a target

All offered stable toolchains include `wasm32-unknown-unknown` in addition to the Linux x86_64 host target. Rust `1.98.0` also includes `x86_64-unknown-linux-musl`, `aarch64-unknown-linux-gnu`, `wasm32-wasip1` and `riscv32imac-unknown-none-elf`. Rust `1.98.1` additionally includes `wasm32-wasip2` and `x86_64-unknown-linux-musl`.

Pass Cargo's `--target` for the intended build. Having a target's standard library does not guarantee that a project's linker, native libraries or test execution requirements are available. A cross-compiled binary cannot automatically run on the x86_64 guest.

The guest cannot download a missing target or component. Check the selected toolchain and [environment](https://www.sorus.run/docs/guides/environment) when Cargo reports one missing.

## Toolchain directives inside a job

Programs launched inside managed jobs can use installed Rust toolchains through `cargo +<toolchain>`, `rustfmt +<toolchain>` or `rustup run`. Without a directive, they use the job's selected toolchain.

Inside a job, `+stable` resolves to the selected toolchain when it is stable, otherwise the newest installed stable. `+nightly` uses the selected nightly or newest installed nightly. This differs from selecting the platform's `stable` alias at submission.

`rustup` inspection commands report the installed tools. Operations that would install, update or remove tools fail; jobs have no public download path.


## Compare build inputs

Before comparing timings, align the source, compiler, Cargo command, features, profile, target and dependency lock. Inspect any reported build-configuration changes as well. Different inputs can change both the work performed and the resulting artifact.

The guest does not inherit your laptop's environment. Use `--env NAME=VALUE` for accepted non-secret job settings and check the [job environment](https://www.sorus.run/docs/guides/environment) for installed libraries and network limits.
