Repository navigation
[RemoveImports] Support specifying imports to remove with arguments - #9395
Open
jeremy-code wants to merge 1 commit into
Open
jeremy-code wants to merge 1 commit into
jeremy-code wants to merge 1 commit into
Conversation
tlively
self-requested a review
November 14, 2026 10:33
jeremy-code
commented
Nov 14, 2026
| toRemove.insert(func->name); | ||
| return; | ||
| } | ||
| auto full = func->module.toString() + '.' + func->base.toString(); |
Author
There was a problem hiding this comment.
Same syntax as the Asyncify pass:
binaryen/src/passes/Asyncify.cpp
Lines 1729 to 1731 in 5d31e56
If passed with no arguments, the current behavior where all imports are removed is preserved. If passed with a comma-separated list of imports (with format module.base or wildcards) or a response file, only the specified imports will be removed.
jeremy-code
force-pushed
the
dev/remove-imports-arguments
branch
from
November 14, 2026 10:40
30705c3 to
9902962
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If passed with no arguments, the current behavior where all imports are removed is preserved. If passed with a comma-separated list of imports (with format module.base or wildcards) or a response file, only the specified imports will be removed.
This might be useful if, for example, you are compiling a WebAssembly module with WASI, but do not want certain functions (e.g. filesystem, pthreads) to be implemented. There may also be niche usage with
wasm-merge(e.g. merging with an upstream WebAssembly binary where you don't want to provide all imports).