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

[GR-44604] Implement Component Model Proposal for WebAssembly #9762

Open
fniephaus opened this issue Sep 26, 2024 · 0 comments
Open

[GR-44604] Implement Component Model Proposal for WebAssembly #9762

fniephaus opened this issue Sep 26, 2024 · 0 comments
Assignees
Labels

Comments

@fniephaus
Copy link
Member

TL;DR

We plan to implement the WebAssembly Component Model proposal in GraalWasm.

Details

When embedding a WebAssembly module, you get to access its exports, mainly the functions that you will be calling. However, these functions only operate on very simple primitive types (integers and floating-point numbers). Richer types like strings or lists have to be represented in terms of integers and floating-point numbers, for example by the use of pointers and offsets. Those representations are oftentimes not interchangeable across languages.

The Component Model proposal aims to fix this by introducing a new abstraction for composing WebAssembly code - components. Like WebAssembly modules, components define their interface as a set of imports and exports, but unlike WebAssembly modules, only functions can be imported and exported. However, these functions have high-level type definitions and can work on rich data types.
Internally, the component is responsible for mapping these high-level data types onto the WebAssembly primitives of the underlying module. By implementing this proposal, we will improve the interoperability of GraalWasm with Java and other Graal Languages.

More details at https://component-model.bytecodealliance.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants