Docs menu
Runtime versions
Which Rust toolchains Primcloud installs, how to pin one with rust-toolchain or rust-toolchain.toml, and how to upgrade.
On this page
Primcloud installs the Rust toolchain your repo asks for through a rust-toolchain or rust-toolchain.toml file, the same files rustup reads. If you don't ask for anything, you get the current stable release.
Supported versions#
Primcloud doesn't keep its own list of Rust releases. Toolchains are resolved against Rust's official release channel at build time, so any released stable version is installable, and a new release is available as soon as it is published there.
Three forms of channel are accepted:
| Channel | Installs |
|---|---|
stable |
The current stable release |
An exact version, such as 1.99.0 |
That release |
A minor version, such as 1.99 |
The newest patch release of that minor |
nightly and beta are not supported, and neither are dated channels (nightly-2026-10-01) or channels with a host suffix (1.99.0-x86_64-unknown-linux-gnu). A repo that names one fails the build with an "Unsupported Rust toolchain channel" error.
Pinning a version#
Two files can name the channel. When both exist, rust-toolchain wins, the same precedence rustup applies.
1. rust-toolchain.toml: the current format. Set channel under [toolchain]:
[toolchain]
channel = "1.99.0"
Only channel is read. components, targets, and profile are ignored. The build always installs rustc, cargo, and the standard library for the platform it runs on. A file with no channel means stable.
2. rust-toolchain: the legacy format. A single line holding the channel name:
1.99.0
As with rustup, a rust-toolchain file of more than one line is read as TOML in the format above. An empty file fails the build.
If neither file exists, the build installs the current stable release. That's fine while you're moving fast, but every new stable release changes your compiler on the next deploy. Pin a version when you want a rebuild to produce the same binary.
The rust-version field in Cargo.toml doesn't select a toolchain. It's still enforced by Cargo, so a pinned toolchain older than your rust-version fails the compile.
Upgrading#
Edit the channel in your toolchain file, commit, and push:
[toolchain]
channel = "1.98.0"
becomes:
[toolchain]
channel = "1.99.0"
The next build installs the new toolchain. Compiled artifacts from a different Rust version aren't reused, so expect one full recompile, then normal incremental speed from the next deploy on. The same applies to an unpinned app on the first deploy after a new stable release.
Read the Rust release notes before a bump. A newer compiler can turn on lints or reject code the old one accepted.
When a version can't be resolved#
A version that was never released (a typo, or a release that hasn't shipped yet) fails the build with a "Rust has no release for the channel" error. Fix the channel in your toolchain file to a released version, or to stable.