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

WASI Preview 2/component model support #105

Open
bacongobbler opened this issue Jul 17, 2024 · 1 comment
Open

WASI Preview 2/component model support #105

bacongobbler opened this issue Jul 17, 2024 · 1 comment

Comments

@bacongobbler
Copy link

bacongobbler commented Jul 17, 2024

Hey there! Really cool project.

I was curious to see if one someone from the community is interested in adding support for applications that have been compiled against WASI preview 2 and the component model.

For some background context, I'm really interested in embedding a library compiled to WebAssembly into an iOS app. My library has been compiled to WASI via Rust's wasm32-wasi-preview2 target and I'm looking to see how many different devices I can currently embed that library into.

Is there a limitation preventing this project from supporting WASI preview 2 and/or the component model? Are there alternative runtimes available with wasip2 support that you're aware of?

Thank you!

@kateinoigakukun
Copy link
Member

kateinoigakukun commented Jul 18, 2024

Currently, we support generating overlay (bindgen in Rust terminology) code from WIT file for both host runtime side and guest Wasm program side, and the generated code allows lifting / lowering Canonical ABI values.

https://github.com/swiftwasm/WasmKit/tree/main/Sources/WITOverlayGenerator

However, we currently don't implement the following features at this moment, so WasmKit might not satisfy your use case right now, but I'm definitely interested in fully supporting CM in the future. It's just a human resource limitation.

  • Component binary parser
  • Component instantiation linker
  • WASI Preview 2

An alternative solution for you I have in mind is jco, which allows lowering a component into core modules and JS glue code. I think you can use the tool with JavaScriptCore engine for now, but I've never tried it.

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

No branches or pull requests

2 participants