-
Notifications
You must be signed in to change notification settings - Fork 13.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 rust-lang/cargo#15122 might be a duplicate of this issue. |
Building this (simpler) library also results in mismatching WASM hashes on Ubuntu and macOS:
|
I am seeing differences in simple wasm binaries when compiled with 1.79 and 1.80 on both macos and linux. I have used The two differences I see are:
The latter seems the most important, as it could conceivably influence the former. |
I see that cargo is passing different values for |
The above issue may be fixed by rust-lang/cargo#14107, which references #117597, which this may be a duplicate of. |
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: