[web]: update how flutter web builds its sdk artifacts #99161
Labels
dependency: dart
Dart team may need to help us
e: web_canvaskit
CanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Web
e: web_html
HTML rendering backend for Web
engine
flutter/engine repository. See also e: labels.
P2
Important issues not at the top of the work list
platform-web
Web applications specifically
Currently flutter web uses a mix of approaches to build its SDK artifacts, which are different than what's done in the Dart SDK repo and our internal build systems. We would like to align them.
This includes the following small changes:
compile_platform
script instead of thekernel_worker
. Technically the output of both tools is supposed to be the same, so this part of the change is only for consistency/tech debt.dart:ui
. Today flutter web ships the artifacts from the Dart SDK. Alldart:*
libraries in the Dart SDK are shipped as a kernel binary file. Whereasdart:ui
anddart:_engine
are shipped as source. This pushes the cost of compiling these libraries to the client. This may not be noticeable to users, but it feels wasteful and inconsistent with what we do elsewhere since are doing this effort on every single build of a flutter web application in the wild.There are two things worth noting:
compile_platform
script didn't support specifying a second library as an input, as a result this was not possible before. We have fixed that in dart-lang/sdk@14fa941The text was updated successfully, but these errors were encountered: