cargo-dist
cargo-dist copied to clipboard
Workflow fails because the rustc version is too old
I have a scrunkly little project that I tried setting up a GH action for. Yesterday, it worked using rust 1.77.2, but it keeps failing now that I set the project's rust-version to 1.78.0:
error: package `realpha v1.0.2 (/Users/runner/work/realpha/realpha)` cannot be built because it requires rustc 1.78.0 or newer, while the currently active rustc version is 1.77.2
Rust 1.78 basically just came out. Is this a situation where I just have to wait for something upstream to get updated or is this something I can fix?
All the relevant files are here: release.yml, Cargo.toml
You should be able to handle this by adding a rust-toolchain.toml to your project.
https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file
Is there no other way to influence which rust version gets used? I don't know if I'm comfortable having a second file with a pinned rust version around when all I want is a minimum version.
Yeah it's a bit weird but it's the Official Rust Solution to this kinda problem.