WebAssembly / WebAssembly/WASI
command and extra exports
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
recent versions of llvm wasm-ld inserts ctor/dtor for every exports for a command. [1]
it broke a few use cases including wamr's malloc/free exports. [2]
while preview2 slide [3] p7 says "No other exports", my understanding is that component-model will use some exports like canonical_abi_realloc/free, which are essentially the same as what the above mentioned wamr malloc/free exports do.
anyway, whatever we will do for preview2, it's better to unbreak the existing use cases.
IMO, the wasm-ld patch in question should be reverted, or at least conditionalized to allow plain exports.
how do you think?
[1] https://reviews.llvm.org/D81689
[2] https://reviews.llvm.org/D81689#3611504
[3] https://github.com/WebAssembly/meetings/blob/main/wasi/2022/presentations/2022-06-30-gohman-wasi-preview2.pdf
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
Start with the linked LLVM review D81689 and its discussion of ctor/dtor insertion, then compare the WAMR malloc/free use case with the WASI Preview2 presentation linked in the issue. Determine whether the existing export behavior should be restored or made conditional, and document the agreed direction for unbreaking plain exports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100