WebAssembly / WebAssembly/WASI

command and extra exports

Open
#493 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-inactive
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.