Repository navigation
Done
Done
Copy link
Labels
P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team
Description
Overview
This issue tracks enabling the new modular Dart VM service implementation (pkg/dart_runtime_service_vm) by default in the Flutter engine and flutter_tools, replacing the legacy dart:vmservice_io implementation.
- Tracking PR: [tool][engine] Enable experimental VM service by default #190100
- Dart SDK Meta Issue: [vm/service] Meta: Reimplement and migrate VM service to modular package (dart_runtime_service_vm) dart-lang/sdk#64161
Why This Work Is Needed
- Modernized Architecture: The legacy VM service implementation is bundled inside the Dart SDK runtime (
runtime/bin/vmservice/). Moving topkg/dart_runtime_service_vmbrings the VM service codebase into a standalone, maintainable Dart package that leverages standard Dart package tooling and dependencies. - Simplified Embedder Startup: The legacy service isolate relied on custom embedder hooks in
dart_service_isolate.ccthat dynamically looked up and swapped the root library (Dart_LookupLibrary("dart:vmservice_io")/Dart_SetRootLibrary). The new implementation boots the service entrypoint directly from a Kernel snapshot (vmservice_snapshot.dill) in debug mode and an AOT shared library (libvmservice_snapshot.{so,dylib,dll}) in profile mode. - Standardized Packaging Across Platforms: Unifies how VM service artifacts are produced, packaged, and loaded across all supported platforms (Android, iOS, macOS, Windows, Linux, and Fuchsia).
Summary of Changes
- C++ Embedder: Updated
DartIsolate::DartCreateAndStartServiceIsolateandDartServiceIsolate::Startupto boot the root library directly withoutdart:vmservice_iolookups. - Engine Build Rules & Snapshots:
- Android: Packages
vmservice_snapshot.dillin debug APK assets (extracted viaFlutterLoader.java) andlibvmservice_snapshot.soin profile mode. - iOS & macOS: Bundles
vmservice_snapshot.dillin debug assets and packageslibvmservice_snapshot.dylibin macOS profile framework with nested codesigning. - Windows & Linux: Bundles
vmservice_snapshot.dillin debug mode and packageslibvmservice_snapshot.dll/libvmservice_snapshot.soin profile mode. - Fuchsia: Adds frontend server target for
vmservice_snapshot_dilland includes it in package assets.
- Android: Packages
- flutter_tools: Updated build targets (
DebugIosApplicationBundle,DebugMacOSBundleFlutterAssets,UnpackLinux,UnpackWindows) and device launch runners to pass--vmservice-kernel-pathin debug mode and--aot-vmservice-shared-library-namein profile mode.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team
Activity
[tool, engine] Bundle VMService.framework in profile mode on Darwin
[engine] Fix ObjC and Python formatting
[tool] Format build_ios_framework_module_test.dart
[vm, service] Notify embedder of server state
[tool] Fix Darwin SwiftPM VMService mode switches and simplify bundling
[tool] Defer SwiftPM prebuild symlink updates when leaving Profile
[tool] Resolve UnpackIosVmService via resolveDependencies in profile
[tool][engine] Enable experimental VM service by default (flutter#190100
Revert: [tool][engine] Enable experimental VM service by default (flu…
Reland [tool][engine] Enable experimental VM service by default (flut…