Skip to content

Latest commit

 

History

History
202 lines (161 loc) · 11.2 KB

arm64.md

File metadata and controls

202 lines (161 loc) · 11.2 KB

Architecture selection

中文 | English

Available releases include architecture suffixes such as 3.47.4-arm64 and 3.47.4-x64. You can install both builds and switch between them. On an Apple silicon Mac:

vfox install flutter@3.47.4-arm64
vfox install flutter@3.47.4-x64
vfox use --global flutter@3.47.4-x64

Commands without an architecture, such as vfox install flutter@3.47.4 or vfox install flutter@stable, continue to select the host architecture and keep their existing version names. Channels also accept a suffix, such as vfox install flutter@stable-x64. The version list shows the default architecture first, followed by other architectures, with each group ordered by version. This keeps @latest on the default architecture.

Only architectures provided by Flutter for the current operating system are listed. A request for another one fails with no installable runtime provided. On ARM64, a name without a suffix fails too for a release that Flutter published an x64 build of only, with a message that names the -x64 name, see Apple silicon and Releases without architecture metadata.

What each machine gets

Machine 3.47.4, stable 3.47.4-x64 3.47.4-arm64
Linux x64 the Linux archive the same archive, installed as 3.47.4-x64 not offered
Linux ARM64 a source install the Linux x64 archive, which does not run here a source install, named 3.47.4-arm64
macOS Apple silicon the arm64 archive the x64 archive, which needs Rosetta the arm64 archive, named 3.47.4-arm64
macOS Intel the x64 archive the same archive, named 3.47.4-x64 the arm64 archive, which does not run here
Windows x64 the Windows archive the same archive, installed as 3.47.4-x64 not offered
Windows ARM64 a source install the Windows x64 archive a source install, named 3.47.4-arm64

The names in the last two columns are the installed names, see versions.md. Installing 3.47.4 and 3.47.4-x64 on an x64 machine gives two installs of the same Flutter. Write the suffix always or never.

Releases without architecture metadata

Flutter's release index gives an architecture (dart_sdk_arch) for most releases, and none for some old ones. On 2026-12-01 these were the stable releases 1.17.0 to 1.17.5, 1.22.5 and 1.22.6, and the pre-releases up to 2.10.0-0.3.pre, 127 versions in all. Flutter published an x64 build of each. On x64 machines the plugin lists them without a suffix and installs that build, and takes -x64 for them too:

vfox install flutter@1.22.6

ARM64 machines list them as 1.22.6-x64, with the other foreign builds, so that a name without a suffix never installs a build for another CPU. Linux ARM64 installs the releases from 1.27.0-4.0.pre on from source, as -arm64 and under the plain name, see Releases that run natively. For the others a plain name fails and says which name installs the x64 build:

flutter 1.22.6 has an x64 build only, which needs emulation on arm64: install flutter@1.22.6-x64 for it

macOS

Apple silicon

Running an x64 build requires Rosetta.

Flutter published arm64 builds from 2.12.0-4.1.pre (pre-releases) and 3.0.0 (stable) on. An older release has an x64 build only, and the plain name does not fall back to it, so ask for it:

vfox install flutter@2.10.5-x64

vfox install flutter@2.10.5 fails with flutter 2.10.5 has an x64 build only, which needs emulation on arm64: install flutter@2.10.5-x64 for it.

Intel

The macOS release index holds arm64 builds whatever the Mac, so they are listed on an Intel Mac too, and vfox install flutter@3.47.4-arm64 installs one. It cannot run on an Intel Mac.

Linux ARM64

On Linux ARM64 the plugin installs a checkout of the official flutter/flutter repository instead of a prebuilt bundle. The Flutter tool bootstraps the matching native dart-sdk-linux-arm64 itself on first run, so the result is a native SDK.

Explicit -x64 requests still resolve to the upstream archive, which cannot run on Linux ARM64.

Windows ARM64

On Windows ARM64 the plugin installs a checkout of the official flutter/flutter repository instead of a prebuilt bundle, for the same reason as Linux ARM64: upstream publishes no windows-arm64 archives. The Flutter tool bootstraps the matching native dart-sdk-windows-arm64 itself on first run, so the result is a native SDK.

Explicit -x64 requests still resolve to the upstream x64 archive. It is not a native build, and the plugin's tests do not run it.

How a source install works

Linux ARM64 and Windows ARM64 list a -arm64 source install for the releases that run with a native Dart SDK, taken from the same release index, see Releases that run natively. On 2026-12-05 the list had 341 of them on Linux, 42 of its lines for the 37 releases without architecture metadata, and 48 on Windows. Installing one:

  1. The plugin asks the repository for its refs (git ls-remote, up to three times), so that an install that cannot reach it stops before vfox changes anything, such as the version that vfox install --reinstall replaces.
  2. vfox makes the install directory, and the plugin runs git init in it and sets core.longpaths=true and core.autocrlf=false.
  3. It fetches the commit that the release index names for the release, git fetch --depth 1 https://github.com/flutter/flutter.git <commit>, up to three times.
  4. It checks the commit out on a branch named after the release's channel (stable, beta or dev), tags it with the release's name, and checks that bin/internal/engine.version exists. Where a step fails, vfox removes the directory.

git checks the code it receives against that commit, so a mirror cannot hand out other code. It is the commit that the official archive of the release is made from. For five releases Flutter's tag of the same name is another commit (on 2026-12-01): Flutter published 3.9.0-0.1.pre, 3.13.3 and 3.17.0-0.0.pre again from later commits, and the commits of 3.11.0-0.0.pre and 3.21.0-0.0.pre hold cherry-picks on top of the tag.

The result is a shallow clone of one commit, with the release's tag, on the branch of its channel. It is about 225 MB, and fetching it for 3.47.7 took 10 seconds on a fast connection. flutter --version reports the release and its channel, such as Flutter 3.47.4 • channel stable (the old 1.27.0-4.0.pre reports channel unknown). The checkout has no origin remote, so it also says unknown source, and flutter doctor warns Unknown upstream repository: with the remote, Flutter's check for a newer version would run git fetch --tags, which pulls the whole history into the shallow clone (more than 400 MB, measured on 2026-12-01).

Installs made by release 0.2.6 and older have no tag and are not on the branch of a channel, so they report 0.0.0-unknown on channel [user-branch], and flutter pub get fails for an app that asks for a Flutter version, see troubleshooting.md.

Releases that run natively

The point of an -arm64 source install is a native Dart SDK. The Flutter tool takes the ARM64 Dart SDK on its first run only when two things hold: the release's own bootstrap script (bin/internal/update_dart_sdk.sh, update_dart_sdk.ps1 on Windows) has to ask for it, and Flutter's storage has to have it (dart-sdk-<os>-arm64.zip under the engine revision of the release). This is the oldest release for which both hold, checked on 2026-10-21 for the 300 releases that have an x64 build:

Machine Native Dart SDK from Before it
Linux ARM64 Flutter 2.2.0 The script asks for the x64 SDK, 1.20.0 to 2.0.6 (17 releases). Storage has the ARM64 SDK from 2.0.0 on, but these scripts do not ask for it, and an ARM64 machine does not run the x64 SDK
Windows ARM64 Flutter 3.44.0-0.1.pre The script asks for the ARM64 SDK from 3.20.0-1.1.pre on and, when storage has none, says The current channel's Dart SDK does not support Windows Arm64, falling back to Windows x64... and takes the x64 SDK, which Windows runs through its emulation. Storage has the ARM64 SDK for seven older betas, three of which the tool would use (3.20.0-1.1.pre, 3.21.0-0.0.pre and 3.30.0-0.1.pre)

The releases without architecture metadata were checked the same way on 2026-12-01, all 127 of them. On Linux the script asks by CPU from 1.27.0-4.0.pre on, a pre-release that is older than the stable 2.0 releases, which ask for the x64 SDK, and storage has the ARM64 SDK for each of those 37. On Windows none of them asks for it.

The plugin offers a -arm64 source install from these releases on. Before them, vfox install flutter@1.20.0 on Linux ARM64 and vfox install flutter@3.43.0-0.3.pre on Windows ARM64 fail and say to use the -x64 name, and their -arm64 names fail with no installable runtime provided. The x64 archives of the older releases are still listed: vfox install flutter@3.43.0-0.3.pre-x64 installs one, which Windows ARM64 runs emulated, and flutter@1.20.0-x64 on Linux ARM64 is for where you can run x64 programs. The table is data in lib/source.lua, and development.md shows how to check it.

Limits

Linux ARM64 and Windows ARM64

  • git is required. The plugin runs git ls-remote / init / fetch / checkout against https://github.com/flutter/flutter.git. A transfer that stalls (under 1 KB/s for a minute) is abandoned and retried, up to three attempts; GIT_HTTP_LOW_SPEED_LIMIT / GIT_HTTP_LOW_SPEED_TIME change the threshold.
  • The first flutter run is slow. It downloads the native Dart SDK and builds the Flutter tool, so it needs a network connection.
  • The commit is what is checked. The Flutter tool downloads the Dart SDK and its other artifacts itself, and checking those is Flutter's part.
  • Mirrors don't apply to the clone. FLUTTER_STORAGE_BASE_URL (see mirror.md) only affects the release index, the x64 archives and the Flutter tool's own downloads; source installs clone from GitHub. Set VFOX_FLUTTER_GITHUB_MIRROR (see mirror.md) to mirror the GitHub source install.
  • Old releases are not offered. They do not run with a native Dart SDK, see Releases that run natively.
  • Your git configuration applies. The plugin runs git as you do, except for line endings: it sets core.autocrlf=false in the checkout, so that a global true (which the Git for Windows installer proposes by default) cannot write Flutter's shell scripts with CRLF line endings. Flutter's .gitattributes forces LF only for bin/flutter, bin/flutter-dev and bin/dart, so with true the checkout of a Linux ARM64 install or of an OpenHarmony build on Linux would have CRLF in bin/internal/shared.sh and Flutter's other .sh files, and the first flutter run would stop with bin/internal/shared.sh: line 5: $'\r': command not found, see troubleshooting.md.