• Jackson Gardner's avatar
    Wasm/JS Dual Compile with the flutter tool (#141396) · ba626dc8
    Jackson Gardner authored
    This implements dual compile via the newly available flutter.js bootstrapping APIs for intelligent build fallback.
    * Users can now use the `FlutterLoader.load` API from flutter.js
    * Flutter tool injects build info into the `index.html` of the user so that the bootstrapper knows which build variants are available to bootstrap
    * The semantics of the `--wasm` flag for `flutter build web` have changed:
      - Instead of producing a separate `build/web_wasm` directory, the output goes to the `build/web` directory like a normal web build
      - Produces a dual build that contains two build variants: dart2wasm+skwasm and dart2js+CanvasKit. The dart2wasm+skwasm will only work on Chrome in a cross-origin isolated context, all other environments will fall back to dart2js+CanvasKit.
      - `--wasm` and `--web-renderer` are now mutually exclusive. Since there are multiple build variants with `--wasm`, the web renderer cannot be expressed via a single command-line flag. For now, we are hard coding what build variants are produced with the `--wasm` flag, but I plan on making this more customizable in the future.
    * Build targets now can optionally provide a "build key" which can uniquely identify any specific parameterization of that build target. This way, the build target can invalidate itself by changing its build key. This works a bit better than just stuffing everything into the environment defines because (a) it doesn't invalidate the entire build, just the targets which are affected and (b) settings for multiple build variants don't translate well to the flat map of environment defines.
    ba626dc8
Name
Last commit
Last update
..
abstract_method_smoke_test Loading commit data...
android_custom_host_app Loading commit data...
android_embedding_v2_smoke_test Loading commit data...
android_host_app/.gradle Loading commit data...
android_host_app_v2_embedding Loading commit data...
android_module_host_with_custom_build_v2_embedding/app/src/main/java/io/flutter/addtoapp Loading commit data...
android_semantics_testing Loading commit data...
android_verified_input Loading commit data...
android_views Loading commit data...
channels Loading commit data...
deferred_components_test Loading commit data...
external_textures Loading commit data...
flavors Loading commit data...
flutter_gallery Loading commit data...
gradle_deprecated_settings Loading commit data...
hybrid_android_views Loading commit data...
ios_add2app_life_cycle Loading commit data...
ios_app_with_extensions Loading commit data...
ios_host_app Loading commit data...
ios_host_app_swift Loading commit data...
ios_platform_view_tests Loading commit data...
module_host_with_custom_build/.gradle Loading commit data...
module_host_with_custom_build_v2_embedding Loading commit data...
non_nullable Loading commit data...
platform_interaction Loading commit data...
release_smoke_test Loading commit data...
spell_check Loading commit data...
ui Loading commit data...
web Loading commit data...
web_compile_tests Loading commit data...
web_e2e_tests Loading commit data...
wide_gamut_test Loading commit data...
windows_startup_test Loading commit data...
README.md Loading commit data...