This PR migrates almost all in-comment links that points to the main branch of flutter/engine repository to the flutter/flutter repository, ensuring that such links are always up to date. I've manually verified that all links are valid. There are a few cases where the migration is not so trivial and I had to look up for the updated location or line number, but I'm pretty sure the new value is correct. The only place that I don't know how to migrate is two links in [Upgrading-pre-1.12-Android-projects.md](https://github.com/flutter/flutter/blob/master/docs/platforms/android/Upgrading-pre-1.12-Android-projects.md) pointing to `https://github.com/flutter/engine/blob/main/shell/platform/android/io/flutter/app/FlutterActivity.java`, which I guess no longer exists. There are still many links that point to a specific branch or revision of the engine repo. I don't think we need to migrate these links, since they're probably not meant to be kept up to date. ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [ ] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
3.9 KiB
The Flutter Engine is window toolkit agnostic. If you want to build Flutter embedders on one of the platforms not supported out of the box (i.e, iOS & Android), this page is for you.
This is a very low level API and is not suitable for beginners.
- The window toolkit agnostic component of the Flutter engine is available as a dynamic library in the
flutter_engineGN target in//shell/platform/embedder:flutter_engine. - That target must be built as part of the host GN build. Such builds are already available for desktop Linux & Mac. If you want to target another platform, you will have to configure a GN toolchain for the same.
- You may build this target yourself or download the same artifacts uploaded by the buildbots on each commit.
- The Mac buildbot uploads the artifacts to a known location. Access it here
https://storage.googleapis.com/flutter_infra_release/flutter/FLUTTER_HASH/darwin-x64/FlutterEmbedder.framework.zip.- Replace
FLUTTER_HASHwith the SHA of the Flutter commit you wish to use.
- Replace
- The Linux buildbot uploads the artifacts to a known location. Access it here
https://storage.googleapis.com/flutter_infra_release/flutter/FLUTTER_HASH/linux-x64/linux-x64-embedder.zip- Replace
FLUTTER_HASHwith the SHA of the Flutter commit you wish to use. - The binary is not stripped and contains debug information. Embedders are advised to strip the binary before deployment.
- Replace
- The Windows buildbot uploads the artifacts to a known location. Access it here
https://storage.googleapis.com/flutter_infra_release/flutter/FLUTTER_HASH/windows-x64/windows-x64-embedder.zip- Replace
FLUTTER_HASHwith the SHA of the Flutter commit you wish to use.
- Replace
- The Mac buildbot uploads the artifacts to a known location. Access it here
- The Flutter engine API has no platform specific dependencies, has a stable ABI and is available in its entirety in a single C header file available here.
- To use as a guide, you may use this example embedder that uses GLFW for window management and rendering.
While we do not object to teams creating custom builds of the Flutter engine for their purposes, we do not support this configuration. Not supporting it means that we do not commit to any timelines for fixing bugs that may come up in such a configuration, even for customers for which we would usually be willing to make commitments (see the Issue Hygiene page). It also means that we encourage teams to view such configurations as short-term solutions only and encourage teams to transition away from such configurations at the earliest possible opportunity.
We do not expect custom engine builds to be long-term sustainable. They are not supported on any platform where we plan to be the publisher of a Flutter runtime distinct from the applications that run on the runtime, and they require significant effort to port to our new target platforms such as Web and desktop. There is also an expensive maintenance burden (for example, if we add new features, a custom engine build would need to be updated to support that feature).
We would generally recommend using custom engine builds only when porting Flutter to platforms that are not supported out of the box, for example in embedded hardware.