Skip to content

Migrate engine code off legacy "vm:external-name" native function annotations #190154

Open

Description

@biggs0125

The Dart team would like to deprecate this legacy native function declaration syntax in favor of FFI-based native function declarations.

The legacy version are functions annotated with @pragma('vm:external-name', <name>). The new version would be @Native<FFI_FunctionType>(symbol: <name>).

This query should include all the instances of the legacy-style declarations: https://github.com/search?q=repo%3Aflutter%2Fflutter%20%22vm%3Aexternal-name%22&type=code

Examples of the new-style declarations: https://github.com/search?q=repo%3Aflutter%2Fflutter+%22%40Native%22&type=code

Note: The FFI-based declarations require the native signature of the declaration to be explicitly passed to @Native.

Activity

  1. added
    P1High-priority issues at the top of the work list
    on Jul 28, 2026
  2. jason-simmons commented on Aug 11, 2026

    @jason-simmons
    Contributor

    The code in the main Flutter engine tree has been updated to use FFI.

    The remaining usage of legacy native functions is in the Fuchsia embedder (https://github.com/flutter/flutter/tree/master/engine/src/flutter/shell/platform/fuchsia). The Fuchsia team will need to be involved in that migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions