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

Roadmap: Component Model Support #5549

Open
kateinoigakukun opened this issue Jul 28, 2023 · 2 comments
Open

Roadmap: Component Model Support #5549

kateinoigakukun opened this issue Jul 28, 2023 · 2 comments

Comments

@kateinoigakukun
Copy link
Member

kateinoigakukun commented Jul 28, 2023

Component Model would be one of the most significant ecosystem changes in WebAssembly: https://bytecodealliance.org/articles/webassembly-the-updated-roadmap-for-developers

Here is a list of topics to utilize Component Model in SwiftWasm:

  1. Support -emit-library with Reactor model
    Currently, we only support -emit-executable, so .wasm binary always have main even though it's compiled with -mexec-model=reactor. We should allow linking .wasm without main entrypoint as a self-contained component. (Note that it does not mean we should support dynamic linking)
  2. We can adopt WASI Preview 2, based on Component Model, using adapters: wasi_snapshot_preview1.wasm
  3. Thanks to C interop, we can already export and import things using Component Model compatible tools using wit-bindgen's C code generator. If we can add Swift code generator to the wit-bindgen, it would be much easier to utilize the Component Model in Swift world.

Links

https://bytecodealliance.org/articles/component-model-tooling-compatibility

@aehlke
Copy link

aehlke commented Nov 8, 2023

Do you know if C++ interop is coming as well? I ask because of the Xcode/SPM C++ interop added recently; thanks

@kateinoigakukun
Copy link
Member Author

@aehlke C++ interop will be shipped as a part of 5.9 corresponding release soon :)

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

No branches or pull requests

2 participants