Repository navigation
[web/skwasm] Remove name-based export of function - #188256
Merged
auto-submit[bot] merged 1 commit intoJun 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the @pragma('wasm:export') annotation from the callbackHandler function in surface.dart. I have no feedback to provide.
Member
Author
|
/cc @schultek |
mkustermann
force-pushed
the
remove-export-pragma
branch
from
June 23, 2026 12:29
d49de07 to
32582a7
Compare
The `@pragma('wasm:export')` is intended to be used on functions that
are called by-name from JS or by imported by-name by other wasm modules.
Though the `callbackHandler` seems to be not called by name, instead a
wasm funcref is taken from the function and passed to an imported
`skwasmWrapper.addFunction` function.
Removing the annotation can improve scenarios where flutter is loaded
via deferred loading. It allows defering this function and anything it
depends on (including ffi things).
This can land after dart-lang/sdk@702c9e4eea444 rolled up to flutter.
mkustermann
force-pushed
the
remove-export-pragma
branch
from
June 24, 2026 09:35
32582a7 to
8c50b64
Compare
eyebrowsoffire
left a comment
Contributor
There was a problem hiding this comment.
It has been a while, but I think the reason I exported this in the first place is because it was getting tree-shaken out or something like that. That may no longer be the case. You're right that we don't actually need this as an export otherwise, so let's see if CI passes with the pragma removed.
Member
Author
|
@eyebrowsoffire It does seem like CI tests passed now. |
eyebrowsoffire
approved these changes
Jun 26, 2026
andywolff
pushed a commit
to andywolff/flutter
that referenced
this pull request
Jun 26, 2026
The `@pragma('wasm:export')` is intended to be used on functions that
are called by-name
from JS or imported by-name by other wasm modules.
Though the `callbackHandler` seems to be not called by name, instead a
wasm funcref
is taken from the function and passed to an imported
`skwasmWrapper.addFunction` function.
Removing the annotation can improve scenarios where flutter is loaded
via deferred loading.
It allows deferring this function and anything it depends on (including
ffi things).
This was referenced Jun 27, 2026
This was referenced Jun 29, 2026
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.
The
@pragma('wasm:export')is intended to be used on functions that are called by-namefrom JS or imported by-name by other wasm modules.
Though the
callbackHandlerseems to be not called by name, instead a wasm funcrefis taken from the function and passed to an imported
skwasmWrapper.addFunctionfunction.Removing the annotation can improve scenarios where flutter is loaded via deferred loading.
It allows deferring this function and anything it depends on (including ffi things).