Skip to content

Conversation

cmichi
Copy link

@cmichi cmichi commented Oct 2, 2025

With the upcoming Rust 1.91, linking with polkavm will fail due to:

error: error loading target specification: target-pointer-width: invalid type: string "64", expected u16 at line 16 column 30

This can already be observed in Rust nightly.

The error occurs because of rust-lang/rust#144443, which changes the target-pointer-width type.

This PR raises the MSRV throughout and accounts for this type change. I've raised the MSRV of tools/{benchtool,gastool} as well, as those use the polkavm linker too.

The CI will fail for now, but once Rust 1.91 is published (October 30, 2025) it will succeed. I'm already creating the PR now to surface that this is the cause of failure to link in nightly.

@koute
Copy link
Collaborator

koute commented Oct 9, 2025

Sigh.... they made such silly breaking change?! Seriously?

Thank you for the PR, I had no idea they broke this.

However, I really don't want to bump the MSRV, especially to a version that is going to just be released. Not everyone updates their compiler immediately, and not everyone even can update it. We still want to be able to push new PolkaVM versions to older, stable branches, which might still use an older compiler, so bumping it to a bleeding-edge version of rustc isn't really an acceptable solution. I've only just bumped the MSRV to 1.86.0 two months ago (being forced to do it by Rust analyzer stopping support, and by the lack of stable SIMD; otherwise I was perfectly happy with staying on 1.75 forever), and I'm not planning to bump it again probably for another half a year at least.

So we'll need to find another solution that will work on both old and new versions of rustc.

@cmichi
Copy link
Author

cmichi commented Oct 9, 2025

So we'll need to find another solution that will work on both old and new versions of rustc.

For cargo-contract (cli for ink!) we solved it in use-ink/cargo-contract#2131 by adapting the type in the JSON based on the active toolchain.

@koute
Copy link
Collaborator

koute commented Oct 9, 2025

Yeah, we'll have to do something similar. I already do version detection in picosimd (which is needed for my new gas cost model implementation), so we'll do something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants