-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Mismatched wasm output on darwin vs Ubuntu #97919
Comments
When you refer to "matching outputs" do you mean the compiled wasm binaries? I don't think rustc guarantees binary stability between compilations performed on the same machine, let alone those performed on different host platforms. |
Rust does not guarantee reproducible builds between compilers built from different commits, but you should be able to rely on getting reproducible builds given the same target, same toolchain versions and some Are you sure this isn't just an example of some host paths leaking into the wasm output? |
Yes!
Maybe, but when I looked at the wasm (or rather .wat) code there seemed to be differences in the code itself, not just the strings. Will have another go at it with |
Is "B" specified by relative path? It doesn't look like you included your Cargo.toml. If it's specified by relative path my #98185 might be a duplicate of this issue. |
Building this (simpler) library also results in mismatching WASM hashes on Ubuntu and macOS:
|
I tried this code:
When building using the
wasm32-unknown-unknown
target, I expect the output to be the same on Ubuntu and macOS. Instead, I'm getting different outputs. I've tried on different Ubuntu and macOS versions, and the output is consistent across all versions of the same platform. What's really odd is that the slightest various of the code above makes the output match again.This is the command I use to build:
This could be a cargo issue, I'm not sure of what's happening under the hood.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: