-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Breaking change in wasm32-unknown-unknown's ABI on nightly #81386
Comments
That must have been a93dace. This all types with I think there will need to be an #[repr(C)]
pub struct Bar {
pub foo: u8,
}
#[repr(C)]
pub struct Foo {
pub a: Bar,
pub b: u32,
pub c: u32,
}
#[no_mangle]
pub extern "C" fn foo(a: Foo) {} produces rust/compiler/rustc_middle/src/ty/layout.rs Line 2754 in 84864bf PassMode::Direct . This only affects wasm, which isn't supported by cg_clif anyway.
|
#81388 will hopefully fix this. |
Assigning |
@alexcrichton do you remember which of the tests were failing here? I was under the impression wasm-bindgen didn't support passing structs as arguments, and instead passed them by-reference. I'm working with passing structs by-value over Wasm and am dealing with similar ABI weirdnesses (rust-diplomat/diplomat#657), and was curious if wasm-bindgen had already solve the problem somewhere but I can't get it to ever pass any aggregate by-value. |
Alas this is too far back for me, I don't remember :( |
Some tests in the wasm-bindgen project have started failing in nightly, and bisection points to #80594 as the culprit. The minimization of this looks like:
where before this compiles as:
The text was updated successfully, but these errors were encountered: