Skip to content

[engine] Enable new modular VM service (dart_runtime_service_vm) by default #191966

Done

Description

@bkonyi

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.

Why This Work Is Needed

  1. Modernized Architecture: The legacy VM service implementation is bundled inside the Dart SDK runtime (runtime/bin/vmservice/). Moving to pkg/dart_runtime_service_vm brings the VM service codebase into a standalone, maintainable Dart package that leverages standard Dart package tooling and dependencies.
  2. Simplified Embedder Startup: The legacy service isolate relied on custom embedder hooks in dart_service_isolate.cc that 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.
  3. 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::DartCreateAndStartServiceIsolate and DartServiceIsolate::Startup to boot the root library directly without dart:vmservice_io lookups.
  • Engine Build Rules & Snapshots:
    • Android: Packages vmservice_snapshot.dill in debug APK assets (extracted via FlutterLoader.java) and libvmservice_snapshot.so in profile mode.
    • iOS & macOS: Bundles vmservice_snapshot.dill in debug assets and packages libvmservice_snapshot.dylib in macOS profile framework with nested codesigning.
    • Windows & Linux: Bundles vmservice_snapshot.dill in debug mode and packages libvmservice_snapshot.dll / libvmservice_snapshot.so in profile mode.
    • Fuchsia: Adds frontend server target for vmservice_snapshot_dill and includes it in package assets.
  • flutter_tools: Updated build targets (DebugIosApplicationBundle, DebugMacOSBundleFlutterAssets, UnpackLinux, UnpackWindows) and device launch runners to pass --vmservice-kernel-path in debug mode and --aot-vmservice-shared-library-name in profile mode.

Activity

  1. self-assigned this
    on Aug 28, 2026
  2. added
    engine
    team-engine
    on Aug 28, 2026
  3. added
    P2
    triaged-engine
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2engineteam-enginetriaged-engine

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions