Skip to content
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

Correct wasm32 ABI #1952

Closed
wants to merge 1 commit into from
Closed

Correct wasm32 ABI #1952

wants to merge 1 commit into from

Conversation

devsnek
Copy link

@devsnek devsnek commented Dec 21, 2020

Fixes #1944

@highfive
Copy link

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@devsnek devsnek changed the title wip Correct wasm32 ABI Dec 21, 2020
TypeKind::Alias(id) => {
ctx.resolve_type(id).needs_wasm32_abi_hack(ctx)
}
TypeKind::Comp(_) => true,
Copy link
Author

Choose a reason for hiding this comment

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

not sure what to do here. compinfo::layout() is none, compinfo.fields() -> field::layout() is none, etc. How do I figure out the size and shape of this comp?

Copy link
Contributor

Choose a reason for hiding this comment

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

You want self.layout(ctx), compinfo::layout() is just a fallback if we can't get the right size from llvm.

@devsnek
Copy link
Author

devsnek commented Jan 12, 2021

We landed a fix for wasm32-wasi in rustc, so this is now only needed for wasm32-unknown-unknown. Since I'm personally targeting wasi, it is unlikely that I will finish this PR.

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

Successfully merging this pull request may close these issues.

Attempt to correct wasm32 ABI in bindgen
3 participants