Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Adding support for experimental wasm dynamic modules#169256

Closed
biggs0125 wants to merge 5 commits into
flutter:masterfrom
biggs0125:dynamic-modules
Closed

Adding support for experimental wasm dynamic modules#169256
biggs0125 wants to merge 5 commits into
flutter:masterfrom
biggs0125:dynamic-modules

Conversation

@biggs0125
Copy link
Copy Markdown
Contributor

Adds support for the experimental dynamic module feature to Flutter builds targeting wasm.

Also adds the necessary loading mechanism to the entrypoint/embedder script to allow Flutter to load the additional dynamic module files (both a JS and a WASM file).

Allows dynamic modules to be compiled using commands similar to:

// Generates a main module modified to support loading dynamic modules at runtime.
$ flutter build web --wasm --dynamic-module-interface=dynamic_interface.yaml

// Compiles a dynamic module whose entrypoint is declared in 'lib/dyn_main.dart'
$ flutter build web --wasm --dynamic-module-interface=dynamic_interface.yaml --dynamic-module-entrypoint=lib/dyn_main.dart

Flutter tools does the work of managing the additional files produced by the main module compilation and passes them to the compilation of the dynamic module.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions Bot added tool Affects the "flutter" command-line tool. See also t: labels. engine flutter/engine related. See also e: labels. platform-web Web applications specifically labels May 22, 2025
@biggs0125 biggs0125 requested a review from sigmundch May 22, 2025 20:34
@mdebbar mdebbar self-requested a review June 11, 2025 18:16
@mdebbar
Copy link
Copy Markdown
Contributor

mdebbar commented Jun 13, 2025

Parts of this have landed already in #169313

Copy link
Copy Markdown
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good! The unit tests need to be modified, and it would be nice if you could add a unit test that tests this flag. Probably a spot for a unit test would be packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart

@flutter-dashboard
Copy link
Copy Markdown

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@github-actions github-actions Bot removed engine flutter/engine related. See also e: labels. platform-web Web applications specifically labels Jul 17, 2025
@bkonyi
Copy link
Copy Markdown
Contributor

bkonyi commented Aug 11, 2025

@biggs0125 do we plan on moving forward with this PR?

@biggs0125
Copy link
Copy Markdown
Contributor Author

@biggs0125 do we plan on moving forward with this PR?

We're still undecided on how we want to move forward with this feature. So this PR is still on hold for now.

@Piinks
Copy link
Copy Markdown
Contributor

Piinks commented Oct 20, 2025

Greetings from stale PR triage! 👋
Is this change still on your radar?

@biggs0125
Copy link
Copy Markdown
Contributor Author

Thanks for the ping, closing this out for now since we haven't had time to make a real decision here.

@biggs0125 biggs0125 closed this Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants