# Pinned so CI, the Android image and a contributor's laptop agree. # # `build-and-test.yml` already installs exactly 1.92.0 and says why: a floating # toolchain turns an unrelated push into a mystery failure. That reasoning # applies with more force locally than in CI, because the two checks most # sensitive to the compiler version are the two that gate every push. # # `cargo fmt --all -- --check` is the sharp one. rustfmt's output changes # between releases, so a contributor on a newer stable can reformat a file in a # way this CI rejects — a diff nobody wrote, on a line nobody touched. # `clippy -D warnings` is the same story with new lints. # # `rust-version = "1.92"` in the workspace manifest is a *minimum* and stays # where it is; it produces a clear error on an older toolchain rather than a # confusing one. This file is the other half: an upper bound as well as a lower # one, so everyone compiles with the same compiler rather than merely a # sufficient one. # # rustup reads this automatically and will fetch the toolchain on first use. # # `rust-analyzer` is in the component list for the editor's sake, not the # build's. VS Code's rust-analyzer extension ships a server newer than 1.92.0 # supports; without a component here it prompts, on every window, to add one. # Listing it makes rustup supply the server that matches the pin, which is the # same thing the pin buys everywhere else. # # Adding anything here has a cost outside the editor: rustup reconciles this # list against the installed toolchain on the first cargo call in the work # tree and downloads what is missing, inside whatever job is running. So every # environment that builds this repo already carries it — baked into # docker/android's image, and named in the install step of each CI job that # rolls its own toolchain. Keep those in step with this line. [toolchain] channel = "1.92.0" components = ["rustfmt", "clippy", "rust-analyzer"]