Skip to content

Update Rust compiler to 1.85.1#851

Merged
thunderbiscuit merged 1 commit intobitcoindevkit:masterfrom
thunderbiscuit:build/rustc
Sep 5, 2025
Merged

Update Rust compiler to 1.85.1#851
thunderbiscuit merged 1 commit intobitcoindevkit:masterfrom
thunderbiscuit:build/rustc

Conversation

@thunderbiscuit
Copy link
Copy Markdown
Member

This fixes #828.

A few things are noteworthy for reviewers here. First, I tried the bump just like we always do: updating the CI files and the build scripts. You need to install the new toolchain to then build, and it can be done like this:

rustup toolchain install 1.85.1
rustup default 1.85.1

But after taking another look at the uniffi repo and the way Mozilla does it, I noticed they were pinning the Rust compiler version in a file called rust-toolchain.toml, which I had seen before in many Rust projects, including in bdk (which uses the older, rust-version file, but it's the same thing they just haven't updated yet). Upon digging into this and trying to see if it could be useful for us, it became clear that it's the wayyyyyyy cleaner way to do things.

Calling commands like cargo or rustup in a directory which contains this file will automatically tell cargo/rustup to override whatever version of the Rust compiler they consider default and use the pinned version instead. This means we don't need to specify it explicitly in either the CI runs (and keep it in sync!), or in build scripts. It basically ensures everyone builds using the same version of the Rust compiler, but it's defined in one single place. WIN.

This is what I have implemented here.

Copy link
Copy Markdown
Collaborator

@reez reez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5f80de8

That's awesome info you tracked down!

@thunderbiscuit thunderbiscuit merged commit adca42a into bitcoindevkit:master Sep 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update Rust version to 1.85.0

2 participants