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

New ABI: "wasm" #90

Closed
alexcrichton opened this issue Apr 5, 2021 · 3 comments
Closed

New ABI: "wasm" #90

alexcrichton opened this issue Apr 5, 2021 · 3 comments
Labels
meeting-proposal Proposal for a lang team design meeting meeting-scheduled Lang team design meeting that has a scheduled date T-lang

Comments

@alexcrichton
Copy link
Member

Summary

I was recommended by @joshtriplett to open a proposal for design meeting about the new extern "wasm" ABI that I prototyped in rust-lang/rust#83763. This, if stabilized, would add a new ABI to Rust which is specifically for WebAssembly targets to facilitate authors in Rust to target precise WebAssembly signatures if they're either importing or exporting a function of that precise signature.

Background reading

There's quite a lot of possible background reading for this, but the details are generally relatively light with how they correspond to Rust. The motivation for this is a bit thorny, however. In order of increasing level of detail, some possible reading is:

About this issue

The addition of a new "wasm" ABI is intended to solve a longstanding issue in Rust where the wasm32-unknown-unknown target's ABI does not match Clang, making interoperability of C and Rust code more difficult there. In addition to fixing this issue, though a long-lived "wasm" ABI is intended to provide the ability for authors in Rust to target specific WebAssembly signatures. When compiling to WebAssembly the function signature that comes out the other side is generally intuitive but can be a bit of a black-box in some regards. By providing a "wasm" ABI we give room for Rust to have its own definition of how Rust code will map onto generated WebAssembly code. (it's then up to rustc to figure out how to tell LLVM how to do that).

@alexcrichton alexcrichton added meeting-proposal Proposal for a lang team design meeting T-lang labels Apr 5, 2021
@nikomatsakis
Copy link
Contributor

Scheduled for April 21.

@nikomatsakis nikomatsakis added the meeting-scheduled Lang team design meeting that has a scheduled date label Apr 16, 2021
@nikomatsakis
Copy link
Contributor

@alexcrichton wrote up some notes here

@nikomatsakis
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meeting-proposal Proposal for a lang team design meeting meeting-scheduled Lang team design meeting that has a scheduled date T-lang
Projects
Status: No status
Development

No branches or pull requests

2 participants