| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| # Package for the Flutter embedder for Fuchsia. |
| |
| load( |
| "@rules_fuchsia//fuchsia:defs.bzl", |
| "fuchsia_cc_binary", |
| "fuchsia_component_manifest", |
| "fuchsia_package_resource", |
| ) |
| |
| # ELF binary that takes Flutter app assets and runs a Flutter app. |
| fuchsia_cc_binary( |
| name = "embedder", |
| visibility = ["//visibility:public"], |
| srcs = [ |
| # ABI-stable interface for the Flutter embedder platform. Copied from the Flutter Engine. |
| "embedder.h", |
| "main.cc", |
| "libflutter_engine.so", |
| ], |
| deps = [ |
| "@fuchsia_sdk//pkg/async-loop-default", |
| "@fuchsia_sdk//pkg/async-loop-cpp", |
| "@fuchsia_sdk//pkg/syslog", |
| ], |
| ) |
| |
| fuchsia_component_manifest( |
| name = "embedder_manifest", |
| visibility = ["//visibility:public"], |
| src = "meta/embedder.cml", |
| includes = ["@fuchsia_sdk//pkg/syslog:client"], |
| ) |
| |
| # The implementation of the embedder platform for the Flutter Engine. |
| # TODO(akbiggs): This should come from a CIPD bucket instead. |
| fuchsia_package_resource( |
| name = "flutter_engine", |
| visibility = ["//visibility:public"], |
| src = ":libflutter_engine.so", |
| dest = "lib/libflutter_engine.so", |
| ) |