Skip to content

Update MSRV to 1.85.0 #10785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 19, 2025
Merged

Conversation

alexcrichton
Copy link
Member

This makes us eligible to update to the 2024 Rust edition but I'm planning on deferring that to a separate follow-up change.

@alexcrichton alexcrichton requested a review from a team as a code owner May 16, 2025 08:50
@alexcrichton alexcrichton requested review from abrown and removed request for a team May 16, 2025 08:50
Copy link
Member

@abrown abrown left a comment

Choose a reason for hiding this comment

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

👍 but I guess there's a few extra warnings to handle now.

@alexcrichton alexcrichton requested a review from a team as a code owner May 18, 2025 09:39
@alexcrichton alexcrichton requested review from dicej and removed request for a team May 18, 2025 09:39
@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label May 18, 2025
This makes us eligible to update to the 2024 Rust edition but I'm
planning on deferring that to a separate follow-up change.

prtest:full
@alexcrichton alexcrichton requested a review from a team as a code owner May 19, 2025 13:05
@alexcrichton alexcrichton requested review from cfallin and removed request for a team May 19, 2025 13:05
@@ -114,7 +114,7 @@ impl TestFileCompiler {
unsafe extern "C" {
safe fn cosf(f: f32) -> f32;
}
let f = 1.2_f32;
let f = std::hint::black_box(1.2_f32);
Copy link
Member Author

Choose a reason for hiding this comment

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

Digging into this, it looks like LLVM sees in the assertion below assert_eq!(cosf(x), cosf(x)) and then LLVM has built-in knowledge that cosf is pure so it's optimized out entirely. That means libm doesn't get linked at all, meaning later dlsym calls fail.

Using black_box here is apparently enough, but unsure how long it'll last necessarily.

Copy link
Member Author

Choose a reason for hiding this comment

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

For future posterity this is roughly what I was looking at. Basically we just need to preserve the reference to the cosf symbol. (and if anyone knows of a better way to do that let's definitely land that instead!)

@alexcrichton alexcrichton enabled auto-merge May 19, 2025 13:18
@alexcrichton alexcrichton added this pull request to the merge queue May 19, 2025
Merged via the queue into bytecodealliance:main with commit 61ba09f May 19, 2025
160 checks passed
@alexcrichton alexcrichton deleted the update-msrv branch May 19, 2025 13:46
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request May 19, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants