WebAssembly / WebAssembly/binaryen

API replacement for recently removed BinaryenRemoveImport

Open
#1,688 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

With BinaryenRemoveImport respectively Module#removeImport removed, there is no way currently to remove a memory or table import via the C- and JS-API while still keeping the memory intact otherwise. While this isn't super important, I used that for example in one asm.js test where there can't be a memory import, while otherwise emitting the same module.

If I understood correctly, what's necessary to remove an import is to unset module and base on a supported element, but I wonder what'd be the best way to implement this API-wise. If we'd use the internal name, there might be a memory, a table and a function all using name 0 for example. If we'd use the external name, we might end up having functions with no body that were previously imported. Any suggestions?

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 by reviewing the removal of BinaryenRemoveImport and Module#removeImport in the linked pull request, then inspect the C- and JS-API entry points mentioned in the issue. Check the asm.js test example that previously used import removal. Done means a decided API design can remove a memory or table import while preserving the element and is covered for both APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, javascript, wasm
Domain
api, compilers
Issue type
Feature
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.