WebAssembly / WebAssembly/binaryen
Add support for Wasm components in wasm-opt
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
wasm-opt does not support running on a Wasm component, that is the default with WASIp2. wasm-opt is used for example in LLVM to optimize compiled binaries (see https://github.com/llvm/llvm-project/pull/98373/), which is not possible in WASIp2 for now because of this lack of support.
A possible solution may be to iterate over a Wasm component and find the core modules within it, apply current wasm-opt optimizations on each core module, then repackage the component.
Remark: I suppose all of binaryen tools can add support for Wasm components. This issue is for wasm-opt specifically but can be transformed into a more general issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin at the wasm-opt entry point and reproduce its current behavior with a Wasm component. Trace how the component's core modules could be processed and the component repackaged, then establish tests covering optimization of embedded core modules and preservation of the resulting component structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100